generated from sosiristseng/template-juliabook-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.36 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
47
48
49
50
51
52
53
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'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@v2
- name: Convert literate notebooks to ipynb files
shell: julia --color=yes {0}
working-directory: ${{ env.DIR }}
run: |
import Pkg
Pkg.add("Literate")
using Literate
for (root, dirs, files) in walkdir(pwd())
for file in files
if endswith(file, ".jl")
nb = joinpath(root, file)
Literate.notebook(nb, dirname(nb); mdstrings=true, execute=false)
end
end
end
- name: Setup Python
uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
pip install uv
uv pip install --system -r requirements.txt
- name: Build website
run: jupyter-book build ${DIR} --builder linkcheck