Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 16 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ on:
- completed

jobs:
docs:
setup:
runs-on: ubuntu-latest
steps:
- name: Check if upstream workflow failed
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
run: exit 1
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
Expand All @@ -22,11 +25,22 @@ jobs:
- name: Sphinx build
run: |
sphinx-build docs/source docs/build
- name: Deploy
- name: Deploy to GH Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/
force_orphan: true
- name: Deploy to RTD
- uses: actions/upload-artifact@v2
with:
name: docs-${{ github.sha }}
path: docs/build/html
- name: Trigger RTDs build
uses: dfm/rtds-action@v1
with:
webhook_url: ${{ secrets.RTD_URL }}
webhook_token: ${{ secrets.RTD_TOKEN }}
commit_ref: ${{ github.ref }}
8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"myst_parser",
"sphinxemoji.sphinxemoji",
"sphinx.ext.mathjax",
"rtds_action",
]
autodoc_default_options = {"autosummary": True}
sphinxemoji_style = "twemoji"
Expand All @@ -37,6 +38,13 @@

language = "Python"

# GitHub Action Integration
rtds_action_github_repo = "kayjan/bigtree"
rtds_action_path = "../build/html"
rtds_action_artifact_prefix = "docs-"
rtds_action_github_token = os.environ["GH_TOKEN"]
rtds_action_error_if_missing = True

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

Expand Down