🔧 (deploy.yml): add dependency on tests job to ensure successful test… #4
This file contains hidden or 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 to Production | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
tests: | |
uses: ./.github/workflows/tests.yml | |
deploy: | |
name: Deploy to Production | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- name: Pull newest version of application and build | |
uses: appleboy/ssh-action@v1 | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
cd full-stack-fastapi-nuxt-jwt-auth-orm-free-template | |
git pull origin master | |
docker compose up -d --build |