Merge pull request #283 from volunteers-for-city-projects/fix/build #113
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
# .github/workflows/main.yml | |
name: Main Volunteers-for-city-projects frontend workflow | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
call_tests: | |
name: Tests | |
uses: volunteers-for-city-projects/volunteers-frontend/.github/workflows/ci.yml@develop | |
secrets: inherit | |
call_build: | |
name: Build and Push in Docker Hub | |
needs: | |
- call_tests | |
uses: volunteers-for-city-projects/volunteers-frontend/.github/workflows/build.yml@develop | |
secrets: inherit | |
deploy: | |
runs-on: ubuntu-latest | |
needs: | |
- call_build | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Executing remote ssh commands to deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
key: ${{ secrets.SSH_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
script: | | |
cd better-together | |
sudo docker compose -f docker-compose.production.yml pull | |
sudo docker compose -f docker-compose.production.yml down | |
sudo docker compose -f docker-compose.production.yml up -d | |
sudo docker system prune -f |