This commit is contained in:
parent
c1e30bc8f0
commit
54c0598582
1 changed files with 28 additions and 0 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/greendale on the host, bind-mounted into this
|
||||||
|
# container at the same path (see runner container.options) so
|
||||||
|
# `docker compose`'s relative paths resolve against the real host
|
||||||
|
# directory rather than an ephemeral one. `.env` is server-only and
|
||||||
|
# must survive every deploy.
|
||||||
|
- name: Sync source to deploy path
|
||||||
|
run: |
|
||||||
|
rsync -a --delete \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='.env' \
|
||||||
|
./ /mnt/user/appdata/greendale/
|
||||||
|
|
||||||
|
- name: Rebuild and restart
|
||||||
|
working-directory: /mnt/user/appdata/greendale
|
||||||
|
run: docker compose up -d --build
|
||||||
Loading…
Add table
Add a link
Reference in a new issue