-
Notifications
You must be signed in to change notification settings - Fork 1.5k
46 lines (43 loc) · 1.45 KB
/
linkcheck.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: linkcheck
on:
pull_request: {}
push:
branches:
- main
permissions:
contents: read
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CARGO_INCREMENTAL: 0
jobs:
docs-linkcheck:
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'linkcheck'))
runs-on: ubuntu-latest
name: "linkcheck"
timeout-minutes: 10
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false
- name: Setup python
id: setup-python
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
with:
python-version: 3.11
- name: Cache rust and pip
uses: ./.github/actions/cache
timeout-minutes: 2
with:
# This creates the same key as the docs job (as long as they have the same
# python version)
key: 3.11-${{ steps.setup-python.outputs.python-version }}
- run: python -m pip install -c ci-constraints-requirements.txt nox
- name: Build nox environment
run: |
nox -v --install-only -s docs-linkcheck
env:
CARGO_TARGET_DIR: ${{ format('{0}/src/rust/target/', github.workspace) }}
- name: linkcheck
run: nox --no-install -s docs-linkcheck -- --color=yes