Skip to content

Merge pull request #261 from IT2810-H26/dev #10

Merge pull request #261 from IT2810-H26/dev

Merge pull request #261 from IT2810-H26/dev #10

Workflow file for this run

# 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