28 lines
650 B
YAML
28 lines
650 B
YAML
# Rebuilds pascal-maas.nl on every push to main.
|
|
# Runs on the self-hosted runner next to Gitea; /srv/site is what nginx serves.
|
|
name: Build blog
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: linux
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
steps:
|
|
- name: Fetch source
|
|
run: |
|
|
rm -rf src
|
|
git clone --depth 1 --branch "${{ gitea.ref_name }}" \
|
|
"https://oauth2:${{ gitea.token }}@git.pascal-maas.nl/${{ gitea.repository }}.git" src
|
|
|
|
- name: Build
|
|
run: python3 src/build.py src out
|
|
|
|
- name: Publish
|
|
run: rsync -a --delete out/ /srv/site/
|