Skip to content

Commit

Permalink
docs: Fixed readme badge for documentation (#111)
Browse files Browse the repository at this point in the history
* docs: Fixed readme badge for documentation

* ci: Fixed documentation deployment job

* docs: Updated README badge
  • Loading branch information
frgfm authored Aug 6, 2022
1 parent 33af1fe commit 22c5981
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/doc-status.yml
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 }}
29 changes: 15 additions & 14 deletions .github/workflows/docs.yml
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]
Expand Down

0 comments on commit 22c5981

Please sign in to comment.