Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# MkDocs Material site: strict build on every docs change; deploy from main only.
# Pages source is workflow (OD-5). Release tags never deploy — push is main-only.
name: Docs

on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "README.md"
- ".github/workflows/docs.yaml"
pull_request:
paths:
- "docs/**"
- "mkdocs.yml"
- "README.md"
- ".github/workflows/docs.yaml"
workflow_dispatch:

permissions:
contents: read
pages: write

Check warning on line 23 in .github/workflows/docs.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=PlatformRelay_kollect-render&issues=AZ_NaD9lAbJ9OG92HApH&open=AZ_NaD9lAbJ9OG92HApH&pullRequest=14
id-token: write

Check warning on line 24 in .github/workflows/docs.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=PlatformRelay_kollect-render&issues=AZ_NaD9lAbJ9OG92HApI&open=AZ_NaD9lAbJ9OG92HApI&pullRequest=14

concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
name: Build MkDocs site
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
cache: pip
cache-dependency-path: docs/requirements-docs.txt

- name: Install MkDocs Material
run: |
pip install --only-binary=:all: --require-hashes -r docs/requirements-docs.txt

- name: Build site
run: mkdocs build --strict

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site

deploy:
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
concurrency:
group: pages
cancel-in-progress: false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
Loading