Merge branch 'development' into staging #42
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 Frontend to Staging | |
| on: | |
| push: | |
| branches: | |
| - staging | |
| paths: | |
| - "src/client/**" | |
| - ".github/workflows/deploy-stag-frontend.yaml" | |
| jobs: | |
| deploy: | |
| name: Deploy Frontend to Staging VM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy over SSH | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.STAG_CLIENT_VM_HOST }} | |
| username: ${{ secrets.STAG_CLIENT_VM_USER }} | |
| key: ${{ secrets.STAG_CLIENT_VM_SSH_PRIVATE_KEY }} | |
| script: | | |
| set -e | |
| cd ~/sentient | |
| git pull origin staging | |
| cd src/client | |
| echo "Building and deploying the frontend..." | |
| docker compose down | |
| docker compose up --build -d | |
| echo "Cleaning up old Docker images..." | |
| docker image prune -f |