Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f90b045
docs: updated docs to docusaurus v3.10.1 and README
Jun 23, 2026
b62af0b
docs: added pydoc-markdown for API documentation.
Jun 24, 2026
06fab83
docs: added page_preview CI job for docs
Jun 24, 2026
3e7e2e6
docs: updated page job (previously deploy) for docs build and publica…
Jun 24, 2026
5894601
docs: docusaurus v1 removed from package.json (re-added accidentally)
Jun 24, 2026
05c1eb7
docs: broken link fixed with __peakrdl__ removed from pydoc-markdown.…
Jun 24, 2026
16ca63d
ci: removed irrelevant test-deploy.yml workflow
Jun 24, 2026
8106ce4
package: setuptools name changed to peakrdl_halcpp for PyPI naming co…
Jun 24, 2026
745129c
ci: page renamed pages
Jun 24, 2026
920bcb5
docs: ci common doc build step using shared action for pages and page…
Jun 24, 2026
5042645
package: ci deploy only on tags, not on every push to master
Jun 24, 2026
ffec5f9
ci: pages_preview launched on modifications to .github/actions/build-…
Jun 24, 2026
f452985
docs: mentionned license in introduction
Jun 24, 2026
0c1f07c
docs: added own master_doc file with link to PeakRDL-halcpp main docu…
Jun 24, 2026
63df60b
docs: version taken from python package
Jun 24, 2026
1bf1390
docs: added version to documentation html pages
Jun 24, 2026
44fb67a
docs: sphinx API generation fixed to use jinja template conf file
Jun 24, 2026
9fdbf58
docs: updated README with cmake flow
Jun 24, 2026
ea2892c
docs: removed pydoc-markdown API documention (only sphinx API kept)
Jun 24, 2026
925e989
docs: python sources docstring check and updated
Jun 24, 2026
2cf4334
docs: typo fixes in docusaurus md/mdx files
Jun 24, 2026
6957488
docs: fixed editUrl
Jun 26, 2026
9afca3f
docs: add -f and --peakrdl-cfg CLI arguments
Jun 26, 2026
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
29 changes: 29 additions & 0 deletions .github/actions/build-docs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Docs
description: Install dependencies and build the Docusaurus documentation

runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r docs/python_requirements.txt

- name: Build docs
shell: bash
run: |
mkdir -p docs/build
cd docs/build
cmake ../
make docusaurus_doc
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
deploy:
needs:
- build_sdist
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/deploy.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to GitHub Pages

on:
push:
branches: [ master ]

jobs:

build_docs_job:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build docs
uses: ./.github/actions/build-docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/docusaurus
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
86 changes: 86 additions & 0 deletions .github/workflows/pages_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: docs_preview_workflow

# Build the docs for any PR touching docs/ or carrying the 'preview-docs' label
# and publish them to a per-PR sub-path on gh-pages, e.g.
# https://hep-soc.github.io/PeakRDL-halcpp/pr-preview/pr-123/
# The preview is removed automatically when the PR is closed.
#
# Note: GITHUB_TOKEN is read-only for pull_request events coming from forks,
# so this only deploys previews for branches pushed within this repository.
on:
pull_request:
types: [opened, reopened, synchronize, closed, labeled]

concurrency:
group: docs-preview-${{ github.event.number }}
cancel-in-progress: true

permissions:
contents: write
pull-requests: write

jobs:
check:
runs-on: ubuntu-latest
outputs:
run: ${{ steps.gate.outputs.run }}
steps:
- uses: actions/checkout@v3

# Only check for file changes on push-like events, not on label or close
- uses: dorny/paths-filter@v3
id: filter
if: github.event.action != 'closed' && github.event.action != 'labeled'
with:
filters: |
docs:
- 'docs/**'
- '.github/workflows/pages_preview.yml'
- '.github/actions/build-docs/**'

- id: gate
shell: bash
run: |
ACTION="${{ github.event.action }}"
HAS_LABEL="${{ contains(github.event.pull_request.labels.*.name, 'preview-docs') }}"
DOCS_CHANGED="${{ steps.filter.outputs.docs }}"

if [[ "$ACTION" == "closed" ]]; then
echo "run=true" >> "$GITHUB_OUTPUT"
elif [[ "$ACTION" == "labeled" ]]; then
# Only rebuild when 'preview-docs' itself is added, not unrelated labels
[[ "${{ github.event.label.name }}" == "preview-docs" ]] && \
echo "run=true" >> "$GITHUB_OUTPUT" || echo "run=false" >> "$GITHUB_OUTPUT"
elif [[ "$HAS_LABEL" == "true" || "$DOCS_CHANGED" == "true" ]]; then
echo "run=true" >> "$GITHUB_OUTPUT"
else
echo "run=false" >> "$GITHUB_OUTPUT"
fi

preview_docs_job:
needs: check
if: needs.check.outputs.run == 'true'
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
DOCS_BASE_URL: /PeakRDL-halcpp/pr-preview/pr-${{ github.event.number }}/

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build docs
if: github.event.action != 'closed'
uses: ./.github/actions/build-docs

- name: Deploy / clean up PR preview
id: preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./docs/build/docusaurus

- name: Print preview URL
if: github.event.action != 'closed'
run: |
echo "Preview URL: ${{ steps.preview.outputs.preview-url }}"
echo "### 📖 Docs preview: ${{ steps.preview.outputs.preview-url }}" >> "$GITHUB_STEP_SUMMARY"
24 changes: 0 additions & 24 deletions .github/workflows/test-deploy.yml

This file was deleted.

2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

/static/api_sphinx
Loading
Loading