From 54c05985821995d5301620d1427a6330760dc605 Mon Sep 17 00:00:00 2001 From: mattie726 Date: Tue, 25 Aug 2026 22:59:56 -0700 Subject: [PATCH] Add Forgejo deploy workflow --- .forgejo/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .forgejo/workflows/deploy.yml diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..ea8ad4d --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -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