Add blog template, build script and CI workflow
All checks were successful
Build blog / build (push) Successful in 0s
All checks were successful
Build blog / build (push) Successful in 0s
This commit is contained in:
27
.gitea/workflows/build.yml
Normal file
27
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
# 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/
|
||||
Reference in New Issue
Block a user