arr-summary/.forgejo/workflows/deploy.yml
mattie726 5baba883f1
All checks were successful
Deploy / deploy (push) Successful in 34s
Install rsync in job container before sync step
2026-08-25 23:23:34 -07:00

31 lines
955 B
YAML

name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rsync
run: apt-get update -qq && apt-get install -y -qq rsync
# 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