Skip to content

Commit 4cd4b75

Browse files
committed
workflows: docs: add
Create a custom workflow for deploying our documentation to GitHub Pages. This does two things: 1. Allows us to retain the original YAML-to-documentation generation process we've used 2. Stops us from relying solely on the main branch for documentation build and review. AI-Generated: Uses Claude Sonnet 5 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1 parent d7eb49c commit 4cd4b75

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
4+
name: Build and deploy documentation
5+
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- "docs/**"
11+
pull_request:
12+
paths:
13+
- "docs/**"
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
concurrency:
22+
group: pages
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: actions/setup-python@v5
32+
with:
33+
python-version: '3'
34+
35+
- name: Install package doc generator dependencies
36+
run: pip install -r docs/requirements.txt
37+
38+
- name: Generate package pages from YAML
39+
run: python docs/packages/generate_packages_doc.py
40+
41+
- name: Setup Pages
42+
uses: actions/configure-pages@v5
43+
44+
- name: Build with Jekyll
45+
uses: actions/jekyll-build-pages@v1
46+
with:
47+
source: ./docs
48+
destination: ./_site
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
53+
deploy:
54+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
55+
needs: build
56+
runs-on: ubuntu-latest
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)