-
Notifications
You must be signed in to change notification settings - Fork 47
43 lines (37 loc) · 1.2 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
name: link-checker
on:
pull_request:
workflow_dispatch:
schedule:
- cron: '30 0 * * SUN' # Sunday “At 00:30”
jobs:
link-checker:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
if: github.repository == 'brian-rose/ClimateLaboratoryBook'
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: book-render
- name: Set cache date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: /usr/share/miniconda3/envs/book-render
key: linux-64-conda-${{ hashFiles('render-environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
id: cache
- name: Update environment
if: steps.cache.outputs.cache-hit != 'true'
run: conda env update -n book-render -f render-environment.yml
- name: Check external links
run: |
jupyter-book build --builder linkcheck .