33 push :
44 pull_request :
55 types : [opened, synchronize]
6+ workflow_dispatch :
7+ inputs :
8+ debug_enabled :
9+ description : ' Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
10+ required : false
11+ default : false
612jobs :
713 build-docs :
814 runs-on : ubuntu-20.04
@@ -16,32 +22,39 @@ jobs:
1622 uses : actions/setup-python@v2
1723 with :
1824 python-version : " 3.7"
25+ # Allow debugging with tmate
26+ - name : Setup tmate session
27+ uses : mxschmitt/action-tmate@v3
28+ if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
29+ with :
30+ limit-access-to-actor : true
1931 - uses : actions/cache@v2
2032 id : cache
2133 with :
2234 path : ${{ env.pythonLocation }}
23- key : ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-docs
35+ key : ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root- docs
2436 - name : Install poetry
2537 if : steps.cache.outputs.cache-hit != 'true'
38+ # TODO: remove python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2
39+ # once there's a release of Poetry 1.2.x including poetry-core > 1.1.0a6
40+ # Ref: https://github.com/python-poetry/poetry-core/pull/188
2641 run : |
2742 python -m pip install --upgrade pip
28- python -m pip install "poetry>=1.2.0a1"
29- python -m poetry plugin add poetry-version-plugin
43+ python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2
44+ python -m pip install "poetry==1.2.0a2"
45+ python -m poetry plugin add poetry-version-plugin
3046 - name : Configure poetry
31- run : python -m poetry config virtualenvs.in-project true
32- - name : Ensure cache is healthy
33- if : steps.cache.outputs.cache-hit == 'true'
34- run : python -m poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
47+ run : python -m poetry config virtualenvs.create false
3548 - name : Install Dependencies
3649 if : steps.cache.outputs.cache-hit != 'true'
3750 run : python -m poetry install
3851 - name : Install Material for MkDocs Insiders
3952 if : github.event.pull_request.head.repo.fork == false && steps.cache.outputs.cache-hit != 'true'
40- run : pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
53+ run : python -m poetry run pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
4154 - name : Build Docs
42- run : python3.7 -m mkdocs build
55+ run : python -m poetry run mkdocs build
4356 - name : Zip docs
44- run : bash ./scripts/zip-docs.sh
57+ run : python -m poetry run bash ./scripts/zip-docs.sh
4558 - uses : actions/upload-artifact@v2
4659 with :
4760 name : docs-zip
0 commit comments