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@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.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@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
|
|
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@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
|