Add Forgejo deploy workflow and update deploy docs
Some checks failed
Deploy / deploy (push) Failing after 13s
Some checks failed
Deploy / deploy (push) Failing after 13s
This commit is contained in:
parent
8a2651ec87
commit
0757e95ad3
3 changed files with 79 additions and 27 deletions
28
.forgejo/workflows/deploy.yml
Normal file
28
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The job container only sees its own checkout — the live app lives
|
||||
# at /mnt/user/appdata/card-grader on the host, bind-mounted into
|
||||
# this container at the same path (see runner container.options) so
|
||||
# `docker compose`'s relative volume paths resolve against the real
|
||||
# host directory rather than an ephemeral one. `data/` holds the
|
||||
# production DB and photos and must survive every deploy.
|
||||
- name: Sync source to deploy path
|
||||
run: |
|
||||
rsync -a --delete \
|
||||
--exclude='.git' \
|
||||
--exclude='data' \
|
||||
./ /mnt/user/appdata/card-grader/
|
||||
|
||||
- name: Rebuild and restart
|
||||
working-directory: /mnt/user/appdata/card-grader
|
||||
run: docker compose up -d --build
|
||||
Loading…
Add table
Add a link
Reference in a new issue