-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Fixed readme badge for documentation (#111)
* docs: Fixed readme badge for documentation * ci: Fixed documentation deployment job * docs: Updated README badge
- Loading branch information
Showing
2 changed files
with
37 additions
and
14 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,22 @@ | ||
name: GH-Pages Status | ||
on: | ||
page_build | ||
|
||
jobs: | ||
see-page-build-payload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
architecture: x64 | ||
- name: check status | ||
run: | | ||
import os | ||
status, errormsg = os.getenv('STATUS'), os.getenv('ERROR') | ||
if status != 'built': raise AssertionError(f"There was an error building the page on GitHub pages.\n\nStatus: {status}\n\nError messsage: {errormsg}") | ||
shell: python | ||
env: | ||
STATUS: ${{ github.event.build.status }} | ||
ERROR: ${{ github.event.build.error.message }} |
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,38 +1,39 @@ | ||
name: doc-deploy | ||
name: docs | ||
on: | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
docs-publish: | ||
runs-on: ubuntu-latest | ||
docs-deploy: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python: [3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
- name: Set up Python 3.8 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
python-version: ${{ matrix.python }} | ||
architecture: x64 | ||
- name: Cache python modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pkg-deps-${{ hashFiles('requirements.txt') }}-${{ hashFiles('**/*.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pkg-deps-${{ hashFiles('requirements.txt') }}- | ||
${{ runner.os }}-pkg-deps- | ||
${{ runner.os }}- | ||
key: ${{ runner.os }}-python-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-docs | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -r docs/requirements.txt | ||
pip install -e ".[docs]" | ||
- name: Build documentation | ||
run: | | ||
sphinx-build docs/source docs/build -a -v | ||
run: sphinx-build docs/source docs/build -a -v | ||
|
||
- name: Documentation sanity check | ||
run: test -e docs/build/index.html || exit | ||
|
||
- name: Install SSH Client 🔑 | ||
uses: webfactory/[email protected] | ||
|