Merge pull request #58 from vishnumohanan404/fix/client #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-client | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "client/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: cd client && docker build --build-arg VITE_GOOGLE_CLIENT_ID=${{secrets.VITE_GOOGLE_CLIENT_ID}} --build-arg VITE_BACKEND_URL=${{secrets.VITE_BACKEND_URL}} -t vishnumohanan/forminit -f Dockerfile.prod . | |
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | |
env: | |
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
- run: docker push vishnumohanan/forminit | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install-civo | |
uses: civo/action-civo@v1.0.0 | |
with: | |
token: ${{secrets.CIVO_TOKEN}} | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
- name: Make config folder | |
run: mkdir ~/.kube | |
- name: Set region | |
run: civo region current ${{secrets.CIVO_REGION}} | |
- name: Save cluster config details to kubeconfig | |
run: civo kubernetes config ${{secrets.CIVO_CLUSTER_NAME}} --save --local-path ~/.kube/config -y | |
- name: Rollout updated manifest | |
run: kubectl rollout restart deployment frontend |