|
|
@@ -0,0 +1,40 @@
|
|
|
+name: docs
|
|
|
+
|
|
|
+# Controls when the workflow will run
|
|
|
+on:
|
|
|
+ # Triggers the workflow on push or pull request events but only for the master branch
|
|
|
+ push:
|
|
|
+ branches: [ master ]
|
|
|
+ pull_request:
|
|
|
+ branches: [ master ]
|
|
|
+
|
|
|
+ # Allows you to run this workflow manually from the Actions tab
|
|
|
+ workflow_dispatch:
|
|
|
+
|
|
|
+jobs:
|
|
|
+ build-docs:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ timeout-minutes: 5
|
|
|
+
|
|
|
+ strategy:
|
|
|
+ matrix:
|
|
|
+ python-version: [3.10.x]
|
|
|
+ steps:
|
|
|
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
|
+ - uses: actions/checkout@v2
|
|
|
+
|
|
|
+ - name: Setup Python
|
|
|
+ uses: actions/setup-python@v2
|
|
|
+ with:
|
|
|
+ python-version: ${{ matrix.python }}
|
|
|
+
|
|
|
+ - name: Install dependencies
|
|
|
+ run: |
|
|
|
+ python -m pip install --upgrade pip
|
|
|
+ python -m pip install -r requirements/docs.txt
|
|
|
+ python -m pip install -e .
|
|
|
+
|
|
|
+ - name: Build docs and run doctests
|
|
|
+ run: |
|
|
|
+ sphinx-build docs "docs/_build/html" --color -W -bhtml
|
|
|
+ sphinx-build -b doctest docs "docs/_build/html"
|