From 5e5b3c8df2cc01d2d61f1256cb2b219c607a8364 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Wed, 27 May 2026 09:47:02 -0700 Subject: [PATCH] ci: GitHub Pages workflow for MkDocs site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds on push to main (docs/ or mkdocs.yml changes) and deploys to https://pyr0ball.github.io/discarr via actions/deploy-pages. Pinned to mkdocs-material 9.x (MIT, <10) — avoids 2.0 licence wall. --- .github/workflows/docs.yml | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..81bbcf8 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,54 @@ +name: Deploy docs to GitHub Pages + +on: + push: + branches: [main] + paths: + - "docs/**" + - "mkdocs.yml" + workflow_dispatch: # allow manual trigger from Actions UI + +# Grant GITHUB_TOKEN permission to deploy to Pages +permissions: + contents: read + pages: write + id-token: write + +# Only one deployment at a time; cancel in-flight runs on new push +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: docs/requirements.txt + + - name: Install MkDocs + run: pip install -r docs/requirements.txt + + - name: Build site + run: mkdocs build --strict --site-dir _site + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _site + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4