-
Notifications
You must be signed in to change notification settings - Fork 42
44 lines (42 loc) · 1.21 KB
/
link-checker.yaml
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
name: link-checker
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Daily “At 00:00”
jobs:
link-checker:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
if: github.repository == 'ProjectPythia/pythia-foundations'
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.10.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@master
with:
channels: conda-forge
channel-priority: strict
activate-environment: pythia-book-dev
auto-update-conda: false
python-version: 3.8
environment-file: environment.yml
mamba-version: '*'
use-mamba: true
- name: Disable notebook execution
shell: python
run: |
import yaml
with open('_config.yml') as f:
data = yaml.safe_load(f)
data['execute']['execute_notebooks'] = 'off'
with open('_config.yml', 'w') as f:
yaml.dump(data, f)
- name: Check external links
run: |
jupyter-book build --builder linkcheck .