ci: add GitHub Pages workflow to publish docs/

Publishes only docs/ via actions/deploy-pages with proper permissions and concurrency. Keeps other pending changes uncommitted.
This commit is contained in:
ben 2025-08-13 13:45:50 +00:00
parent 4d58c6f938
commit 397cc50d0e
1 changed files with 44 additions and 0 deletions

44
.github/workflows/gh-pages.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Deploy Docs to GitHub Pages
on:
push:
branches: [ main ]
paths:
- 'docs/**'
- '.github/workflows/gh-pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
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