This commit is contained in:
parent
ccf87df36d
commit
bf9d669162
1 changed files with 31 additions and 0 deletions
31
.forgejo/workflows/deploy.yml
Normal file
31
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
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/n64-tracker 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. `.env` and `data/`
|
||||
# are server-only and must survive every deploy. `Coverart/` isn't
|
||||
# tracked in git (too large) — it's server-only too, kept in place.
|
||||
- name: Sync source to deploy path
|
||||
run: |
|
||||
rsync -a --delete \
|
||||
--exclude='.git' \
|
||||
--exclude='.env' \
|
||||
--exclude='data' \
|
||||
--exclude='Coverart' \
|
||||
./ /mnt/user/appdata/n64-tracker/
|
||||
|
||||
- name: Rebuild and restart
|
||||
working-directory: /mnt/user/appdata/n64-tracker
|
||||
run: docker compose up -d --build
|
||||
Loading…
Add table
Add a link
Reference in a new issue