From 7a343dfd51e252070a8670d90ffedbda588fbdf1 Mon Sep 17 00:00:00 2001 From: Scriptception Date: Tue, 11 Aug 2026 03:27:01 +0000 Subject: [PATCH] Add pull request site build --- .github/workflows/pr-build.yml | 33 +++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/pr-build.yml diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml new file mode 100644 index 0000000..669895c --- /dev/null +++ b/.github/workflows/pr-build.yml @@ -0,0 +1,33 @@ +name: PR Build + +on: + pull_request: + +permissions: + contents: read + +concurrency: + group: pr-build-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + build: + name: Build Zensical site + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - name: Check out repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + with: + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 + with: + python-version: "3.13" + + - name: Install pinned site generator + run: python -m pip install zensical==0.0.50 + + - name: Build site + run: zensical build --clean diff --git a/README.md b/README.md index a3a5623..49971ae 100644 --- a/README.md +++ b/README.md @@ -34,5 +34,7 @@ zensical serve # http://localhost:8000 zensical build --clean # → site/ ``` +Every pull request builds the site with read-only permissions through +[`.github/workflows/pr-build.yml`](.github/workflows/pr-build.yml). Pushes to `main` that touch `docs/`, `zensical.toml`, or the workflow deploy via [`.github/workflows/docs.yml`](.github/workflows/docs.yml).