-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* prepare self-hosting of docs * update workflow * update workflow * update workflow * update workflow * update workflow * change workflow * dynamically adjust branch whitelist for PRs * use abs path for the sphinx gallery examples dir * update workflow --------- Co-authored-by: Georg Schramm <[email protected]>
- Loading branch information
Showing
10 changed files
with
103 additions
and
6 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,41 @@ | ||
name: Build and Deploy docs to GH pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "v*" | ||
pull_request: | ||
branches: ["master"] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags | ||
|
||
- name: Set up Miniconda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: latest | ||
python-version: 3.12 # Specify the Python version compatible with your environment | ||
environment-file: docs/environment.yml # Use your environment.yml to install dependencies | ||
activate-environment: readthedocs # Name from environment.yml | ||
auto-activate-base: false | ||
- run: | | ||
sphinx-multiversion docs/source _build/html | ||
# Conditional deployment step | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' # Only run on push to main branch, not on PRs | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: _build/html |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
_build/ | ||
|
||
# C extensions | ||
*.so | ||
|
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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,27 @@ | ||
{%- if current_version %} | ||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions"> | ||
<span class="rst-current-version" data-toggle="rst-current-version"> | ||
<span class="fa fa-book"> Other Versions</span> | ||
v: {{ current_version.name }} | ||
<span class="fa fa-caret-down"></span> | ||
</span> | ||
<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> | ||
</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