Skip to content

Commit

Permalink
On the path to multiversioning.
Browse files Browse the repository at this point in the history
  • Loading branch information
clebreto committed Sep 19, 2024
1 parent be17421 commit cdc6c3f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ jobs:
contents: write
steps:

- name: Checkout development branch
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: feature/retrieve_doc
fetch-depth: 0 # Fetch all history for versioning to work

- name: Build Sphinx Docs
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: "apt-get install doxygen -y"
build-command: "make html"
docs-folder: "docs/"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # Include sphinx-multiversion in requirements.txt
- name: Build Sphinx documentation with multiversion
run: |
sphinx-multiversion docs/ _build/html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/build/html/

- name: Deploy
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/feature/retrieve_doc'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html

publish_dir: ./docs/_build/html
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ myst-parser==2.0.0
sphinxcontrib-mermaid==0.9.2
breathe==4.35.0
exhale==0.3.7
sphinx-copybutton>=0.5.0
sphinx-copybutton>=0.5.0
sphinx-multiversion>=0.2.4
5 changes: 5 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#'sphinx.ext.autodoc', # to automatically generate documentation from docstrings
#'sphinx.ext.autosummary', # this extension generates function/method/attribute summary lists
#'sphinx.ext.autosectionlabel', # to automatically generate section labels
'sphinx_multiversion',
'sphinx_design', # to render panels
'myst_parser', # to parse markdown
'sphinxcontrib.mermaid', # to render mermaid diagrams
Expand Down Expand Up @@ -193,3 +194,7 @@

# Set to false in the final version
todo_include_todos = True

# Optional: Exclude certain branches or tags from multi-versioning
smv_branch_whitelist = r'main' # Build documentation only for main
smv_tag_whitelist = r'^v\d+\.\d+.*$' # Only build tags that match version pattern like v1.0

0 comments on commit cdc6c3f

Please sign in to comment.