ci: deploy content on push to main
All checks were successful
Deploy content to live site / deploy (push) Successful in 10s
All checks were successful
Deploy content to live site / deploy (push) Successful in 10s
First Forgejo Actions workflow. Runs on the local runner (host mode), rsyncs the checked-out tree to /srv/zddc/ on the deploy host, excluding /releases/ which the ZDDC source repo owns.
This commit is contained in:
parent
f06d2fff98
commit
cacda0745d
1 changed files with 34 additions and 0 deletions
34
.forgejo/workflows/deploy-content.yml
Normal file
34
.forgejo/workflows/deploy-content.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: Deploy content to live site
|
||||
|
||||
# Hand-edited site content lives in this repo. Every push to main
|
||||
# rsyncs it into /srv/zddc/ on the deploy host (Caddy bind-mount).
|
||||
# /releases/ is owned by the ZDDC source repo's pipeline and is
|
||||
# excluded from this rsync; it's untouched here.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: host
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Rsync content → /srv/zddc/
|
||||
run: |
|
||||
set -eu
|
||||
rsync -av --delete-after \
|
||||
--exclude='/releases/' \
|
||||
--exclude='/.git*' \
|
||||
--exclude='/.forgejo*' \
|
||||
--exclude='/README.md' \
|
||||
--exclude='/LICENSE' \
|
||||
"$GITHUB_WORKSPACE/" /srv/zddc/
|
||||
|
||||
- name: Verify
|
||||
run: |
|
||||
curl -ksI --resolve zddc.varasys.io:8443:127.0.0.1 \
|
||||
https://zddc.varasys.io:8443/ | head -3
|
||||
Loading…
Reference in a new issue