Skip to content

Merge pull request #195 from sayinmehmet47/renovate/lucide-react-0.x #127

Merge pull request #195 from sayinmehmet47/renovate/lucide-react-0.x

Merge pull request #195 from sayinmehmet47/renovate/lucide-react-0.x #127

name: deploy-client
on:
push:
branches:
- main
paths:
- 'client/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- run: cd client
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: client/
platforms: linux/amd64,linux/arm64
push: true
tags: sayinmehmet47/client-kitapkurdu-1
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
- name: Create .kube directory
run: mkdir -p $HOME/.kube
- name: Create .kube/config
run: |
cat <<EOF > $HOME/.kube/config
apiVersion: v1
kind: Config
clusters:
- name: rancher
cluster:
server: "https://rancher.riwi.dev/k8s/clusters/c-m-cp898j4l"
users:
- name: rancher
user:
token: ${{ secrets.KUBE_CONFIG_TOKEN }}
contexts:
- name: rancher
context:
user: rancher
cluster: rancher
namespace: kitapkurdu
current-context: rancher
EOF
- name: Deploy using kubectl
run: kubectl rollout restart deployment/frontend-deployment -n kitapkurdu