Add Forgejo Actions workflow for build and deploy

Triggers on push to main: checks out repo with submodules,
installs Zola, builds the site, and deploys to skippy via rsync.
This commit is contained in:
Graham McIntire 2026-02-17 09:59:16 -06:00
parent f57d3d945d
commit bb5c240aab
No known key found for this signature in database

View file

@ -0,0 +1,33 @@
name: Build and Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Zola
run: |
ZOLA_VERSION="0.19.2"
wget -q "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" -O /tmp/zola.tar.gz
tar -xzf /tmp/zola.tar.gz -C /usr/local/bin
zola --version
- name: Build
run: zola build
- name: Deploy via rsync
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H skippy.w5isp.com >> ~/.ssh/known_hosts
rsync -avz --delete public/ graham@skippy.w5isp.com:/home/graham/apps/w5isp.com/