Merge pull request #5 from GiamBoscaro/dev #5
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'ticketing/auth/**' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.7.x' | |
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- run: npm install | |
working-directory: ./ticketing/auth | |
- run: npm run build | |
working-directory: ./ticketing/auth | |
- run: docker build -t giammarcoboscaro/ticketing-auth . | |
working-directory: ./ticketing/auth | |
- run: docker push giammarcoboscaro/ticketing-auth | |
- uses: digitalocean/action-doctl@v2 | |
with: | |
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | |
- run: doctl kubernetes cluster kubeconfig save udemy-microservices-ticketing-app | |
- run: kubectl rollout restart deployment auth-deploy |