Merge pull request #289 from IT2810-H26/dev #12
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
| # Deploys the app to the VM on every push to main (and from the "Run workflow" button), | |
| # if a self-hosted runner is installed on the VM. It only starts scripts/deploy.sh in the | |
| # clone on the VM, so the deploy is the same as a deploy by hand or from cron. How to set | |
| # it up is in docs/VM_SETUP.md ("7. Automatic deploy"). | |
| name: Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| # Never two deploys at the same time; a new one waits for the one that is running. | |
| concurrency: | |
| group: deploy | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| name: Deploy on the VM | |
| runs-on: self-hosted | |
| steps: | |
| - name: Run the deploy script | |
| run: | | |
| cd "$HOME/wag/build" | |
| git fetch --quiet origin main | |
| git checkout --quiet --force origin/main | |
| ./scripts/deploy.sh --force |