forked from mirrors/kingfisher
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
name: Deploy Documentation
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'docs-site/**'
|
|
- 'docs/**'
|
|
- 'crates/kingfisher-rules/data/rules/**'
|
|
- '.github/workflows/docs.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:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
|
|
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
|
|
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install dependencies
|
|
run: uv pip install --system -r docs-site/requirements.txt
|
|
|
|
- name: Prepare documentation
|
|
run: python3 docs-site/scripts/prepare-docs.py
|
|
|
|
- name: Generate rules page
|
|
run: python3 docs-site/scripts/generate-rules-page.py
|
|
|
|
- name: Build site
|
|
run: cd docs-site && mkdocs build --strict
|
|
env:
|
|
CI: true
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
|
|
with:
|
|
path: docs-site/site
|
|
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
|