pkg (#384) #130
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
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 |