chore(deploy): pin compose project name for persistent server checkout #10
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 on Dell Server | |
| on: | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| deploy: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Deploy application | |
| run: | | |
| set -e | |
| test -f /opt/apps/simplebackup/.env | |
| cd /opt/apps/simplebackup | |
| git fetch origin main | |
| git checkout main | |
| git reset --hard origin/main | |
| docker compose --env-file .env down --remove-orphans | |
| docker compose --env-file .env up -d --build | |
| docker image prune -f |