Fixing cookie problems #8
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-Auth | |
on: # when to run the workflow | |
push: # when a push event occurs | |
branches: # when the push event occurs on the following branches | |
- master # only when the push event occurs on the master branch | |
paths: | |
- 'auth/**' # only when the push event occurs on the auth folder | |
jobs: # the jobs to run | |
build: # build job | |
runs-on: ubuntu-latest # the type of machine to run the job on | |
steps: # the steps to run in the job | |
- uses: actions/[email protected] # checkout the files in the repo to the runner machine | |
- run: cd auth && docker build -t cmhr007/ticketing-auth . # build the image | |
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD # login to docker hub | |
env: | |
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
- run: docker push cmhr007/ticketing-auth # push the image to docker hub | |
- uses: digitalocean/[email protected] # login to digital ocean | |
with: | |
token: ${{secrets.DO_TOKEN}} # digital ocean token | |
- run: doctl kubernetes cluster kubeconfig save ticketing # save the kubeconfig file | |
- run: kubectl rollout restart deployment auth-depl # restart the deployment | |