From ea3f525e84a7cffe3165e0120c0cbb51d03091cf Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Wed, 8 Oct 2025 15:44:20 +0200 Subject: [PATCH] Run build on PRs --- .gitea/workflows/deploy.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f96d024..ad63bd3 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -4,9 +4,29 @@ on: push: branches: - main + pull_request: workflow_dispatch: + jobs: - build-and-deploy-docs: + build-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure git credentials + run: | + git config --global user.name "Gitea Actions" + git config --global user.email "actions@gitea.local" + - uses: actions/setup-python@v5 + with: + python-version: "3" + - name: Install mkdocs-material + run: pip install mkdocs-material=="9.*" + - name: Build documentation + run: mkdocs build -s + + deploy-docs: + needs: build-docs + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -22,8 +42,6 @@ jobs: - name: Build documentation run: mkdocs build -s - name: Deploy documentation - # the default mkdocs build output directory `/site` is gitignored - # so it's safe to `git rm -rf .` run: | git checkout --orphan gitea-pages git rm -rf .