-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Local docs builds with tox * GitHub Pages publishing with the Sphinx recommended actions * Project overview page * Initial developer guide * Initial (very rough) Python API docs * Glossary of key terms * Initial design discussion page
- Loading branch information
Showing
59 changed files
with
2,246 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: "Sphinx: Render docs" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "**" | ||
paths: | ||
# Run for changes to *this* workflow file, but not for other workflows | ||
- ".github/workflows/docs.yml" | ||
# Trigger off docs and Python source code changes | ||
- "docs/**" | ||
- "src/**.py" | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
# Not actually a matrix build, but defined as one for consistency | ||
max-parallel: 1 | ||
matrix: | ||
python-version: [3.12] | ||
os: [ubuntu-latest] | ||
permissions: | ||
# Allow updating the gh-pages branch | ||
contents: write | ||
|
||
# Check https://github.com/actions/action-versions/tree/main/config/actions | ||
# for latest versions if the standard actions start emitting warnings | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# sphinx-action uses docker under the hood and doesn't play nice with the | ||
# dependency caching, so it may be better to switch to using `tox -e docs` | ||
# and living without the nice integrated GitHub Actions error reporting. | ||
|
||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
|
||
# - name: Get pip cache dir | ||
# id: pip-cache | ||
# run: | | ||
# echo "dir=$(python -m pip cache dir)" >> $GITHUB_OUTPUT | ||
|
||
# - name: Cache docs build dependencies | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: ${{ steps.pip-cache.outputs.dir }} | ||
# key: | ||
# pip-docs-${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ hashFiles('docs/requirements.txt') }} | ||
# restore-keys: | | ||
# pip-docs-${{ matrix.os }}-${{ matrix.python-version }}-v1- | ||
|
||
- name: Build HTML | ||
uses: ammaraskar/[email protected] | ||
with: | ||
docs-folder: "docs/" | ||
# Skip link check until after the venvstacks repo is public | ||
# pre-build-command: "sphinx-build -b linkcheck . _build" | ||
build-command: "sphinx-build -b dirhtml . _build" | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: html-docs | ||
path: docs/_build/ | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.