Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #32723 -- Add a GitHub action to run the Sphinx linkcheck builder
- Loading branch information
Sarah Abderemane
committed
May 14, 2021
1 parent
820408d
commit c6c50c9
Showing
1 changed file
with
39 additions
and
0 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,39 @@ | ||
name: Linkcheck | ||
|
||
on: | ||
schedule: | ||
- cron: "0 14 * * 1" # Every Monday at 2PM UTC | ||
|
||
jobs: | ||
linkcheck: | ||
runs-on: ubuntu-latest | ||
name: linkcheck | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- run: python -m pip install -r docs/requirements.txt | ||
- name: Build docs | ||
run: | | ||
cd docs | ||
sphinx-build -b spelling -n -q -W --keep-going -d _build/doctrees -D language=en_US -j auto . _build/spelling | ||
- name: Linkcheck docs | ||
run: | | ||
cd docs | ||
sphinx-build -b linkcheck ../docs/ _build/linkcheck | ||
- name: Upload linkcheck output | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: linkcheck | ||
path: docs/_build/linkcheck/ |