generated from sosiristseng/template-juliabook-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.05 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
name: Check markdown links
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Every month
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/linkcheck.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linkcheck:
env:
DIR: 'docs'
PY_VER: '3.12'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
id: cp
with:
python-version: ${{ env.PY_VER }}
- name: Cache pip
uses: actions/cache@v4
id: cache-pip
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ steps.cp.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
- name: Install python packages
if: ${{ steps.cache-pip.outputs.cache-hit != 'true' }}
run: pip install -r requirements.txt
- name: Build website
run: jupyter-book build ${DIR} --builder linkcheck