fix: rename container name #4
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 API | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npm ci | |
- run: npx nx run api:build | |
- run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
- run: npx nx run api:image:build | |
- run: npx nx run api:image:push | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
port: ${{ secrets.SSH_PORT }} | |
key: ${{ secrets.SSH_KEY }} | |
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }} | |
script: | | |
docker pull gatherloop/gatherloop-pos-api | |
docker stop gatherloop-pos-api | |
docker start gatherloop-pos-api |