55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: Build GitHub Pages
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/**'
|
|
- 'mkdocs.yml'
|
|
- 'ontocast/**' # Check this path
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pages: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
version: "0.9.5"
|
|
- name: Install dependencies
|
|
run: |
|
|
uv sync --group docs --no-group dev
|
|
- name: Build site
|
|
run: |
|
|
uv run mkdocs build --site-dir _site
|
|
- name: Upload Pages artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: _site
|
|
|
|
deploy:
|
|
needs: build
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|