-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: use sphinx-multiversion for version selector
- Loading branch information
1 parent
a7431ce
commit 2ed91f6
Showing
6 changed files
with
58 additions
and
48 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 |
---|---|---|
|
@@ -101,37 +101,10 @@ jobs: | |
- name: Build Python package | ||
run: maturin develop --release --manifest-path pyargus/Cargo.toml | ||
- name: Build HTML docs | ||
run: sphinx-build -b html docs docs/_build/ | ||
run: sphinx-multiversion -b html docs _site | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/') | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/_build/ | ||
destination_dir: ${{ github.ref_name }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: 'gh-pages' | ||
- name: Install tree | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y tree | ||
- run: | | ||
tree -H '.' \ | ||
-L 1 \ | ||
--noreport \ | ||
--dirsfirst \ | ||
--charset utf-8 \ | ||
--ignore-case \ | ||
--timefmt '%d-%b-%Y %H:%M' \ | ||
-I "index.html" \ | ||
-T 'Argus Python Documentation versions' \ | ||
-s -D \ | ||
-o index.html | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add . | ||
if [[ ! $(git diff --quiet) ]]; then | ||
git commit -m "update index.html" | ||
git push | ||
fi | ||
publish_dir: _site/ |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
### Docs ### | ||
/_site/ | ||
### Lcov ### | ||
|
||
*.lcov | ||
|
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,30 @@ | ||
{%- if current_version %} | ||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions"> | ||
<details open="true"> | ||
<summary> | ||
<span class="fa fa-book"> Current Version</span> | ||
{{ current_version.name }} | ||
<span class="fa fa-caret-down"></span> | ||
</summary> | ||
|
||
<div class="rst-other-versions"> | ||
{%- if versions.tags %} | ||
<dl> | ||
<dt>Tags</dt> | ||
{%- for item in versions.tags %} | ||
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd> | ||
{%- endfor %} | ||
</dl> | ||
{%- endif %} | ||
{%- if versions.branches %} | ||
<dl> | ||
<dt>Branches</dt> | ||
{%- for item in versions.branches %} | ||
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd> | ||
{%- endfor %} | ||
</dl> | ||
{%- endif %} | ||
</div> | ||
</details> | ||
</div> | ||
{%- endif %} |
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
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