1010 workflow_call :
1111 inputs :
1212 docs-directory :
13- description : ' Directory containing the documentation to build'
13+ description : ' Directory containing the documentation source to build'
1414 required : false
1515 type : string
16- default : ' ./ documentation'
16+ default : ' documentation'
1717 requirements :
1818 description : ' Path to the requirements file to install dependencies from'
1919 required : true
2828 description : ' Directory to output the html documentation to'
2929 required : false
3030 type : string
31- default : ' ${{inputs.docs-directory}}/ build'
31+ default : ' build'
3232 runner :
3333 description : ' The runner to use for the job'
3434 required : false
4444 build-sphinx-docs :
4545 name : Build Sphinx Docs
4646 runs-on : ${{ inputs.runner }}
47+ timeout-minutes : ${{ inputs.timeout }}
4748 env :
4849 DOCS_DIR : ${{ inputs.docs-directory }}
4950 REQS_FILE : ${{ inputs.requirements }}
@@ -57,22 +58,17 @@ jobs:
5758 uses : actions/setup-python@v6
5859 with :
5960 python-version : ' 3.12'
60-
61- - name : Cache pip packages
62- uses : actions/cache@v4
63- with :
64- path : ~/.cache/pip
65- key : ${{ runner.os }}-pip-${{ hashFiles(env.REQS_FILE) }}
66- restore-keys : ${{ runner.os }}-pip-
67-
68- - name : Minimize pip cache
69- run : python3 -m pip cache purge || true
61+ cache : ' pip'
62+ cache-dependency-path : ${{ inputs.requirements }}
7063
7164 - name : Install dependencies
7265 run : |
7366 python3 -m pip install --upgrade pip
7467 python3 -m pip install -r "$REQS_FILE"
7568
69+ - name : Minimize pip cache
70+ run : python3 -m pip cache remove '*' || true
71+
7672 - name : Lint Sphinx docs
7773 working-directory : ${{ env.DOCS_DIR }}
7874 run : sphinx-lint .
8278 run : |
8379 make html SPHINXOPTS="$SPHINX_OPTS" BUILDDIR="$BUILD_DIR"
8480
85-
8681 - name : Upload artifact to GitHub Pages
8782 if : ${{ (github.event_name == 'push' || github.event_name == 'merge_group') && github.ref_name == 'main'}}
8883 uses : actions/upload-pages-artifact@v4
0 commit comments