-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebuild all documentation from scratch when there is a new release (#396
) * Comment if statements so documentation is built for all versions * Documentation is rebuilt from scratch when there is a release now
- Loading branch information
1 parent
48f5ffc
commit c8a8cc9
Showing
4 changed files
with
77 additions
and
23 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,54 @@ | ||
name: Rebuilt entire documentation | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: r-lib/actions/setup-pandoc@v1 | ||
- name: Checkout Source | ||
uses: actions/checkout@v2 | ||
with: | ||
# require all of history to see all tagged versions' docs | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
python setup.py build | ||
python setup.py install | ||
- name: Checkout gh-pages | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
path: docs/_build/html | ||
|
||
- name: Remove and build documentation from scratch | ||
run: | | ||
rm -rd docs/_build/html | ||
sphinx-multiversion docs docs/_build/html | ||
touch docs/_build/html/.nojekyll | ||
cp docs/_assets/gh-pages-redirect.html docs/_build/html/index.html | ||
- name: Publish Docs to gh-pages | ||
# We pin to the SHA, not the tag, for security reasons. | ||
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions | ||
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/_build/html | ||
keep_files: true |
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