-
Notifications
You must be signed in to change notification settings - Fork 7
72 lines (68 loc) · 2.26 KB
/
checks.yml
File metadata and controls
72 lines (68 loc) · 2.26 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Run Checks
on:
workflow_dispatch:
# push:
# branches: [ main, dev ]
# paths: docs/**
pull_request:
branches: [ main ]
paths: docs/**
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
working-directory: ./docs
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Build with Jekyll
run: bundle exec jekyll build
working-directory: ./docs
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install Node.js dependencies
run: npm ci
- name: Check links (check_links.mjs)
# Three passes run in parallel via /sep/:
# 1. Online (_site/): --fallback-extensions html mirrors GitHub Pages'
# extensionless-URL behaviour. No --base-path needed -- this
# workflow builds without --baseurl (contrast jekyll-gh-pages.yml).
# 2. Offline (_site-offline/): strict, no extension fallback. --forbid
# catches any surviving https://docs.twinbasic.com/<path> link the
# offlinify rewrite missed (bare root URL is exempt).
# 3. Book (_site-pdf/book.html): --no-fail makes failures informational
# (some links are not yet fully resolved).
run: >-
node scripts/check_links.mjs
--offline --include-fragments
--fallback-extensions html
--index-files 'index.html,.'
--root-dir docs/_site
docs/_site
/sep/
--offline --include-fragments
--index-files index.html
--forbid 'https://docs.twinbasic.com'
--root-dir docs/_site-offline
docs/_site-offline
/sep/
--offline --no-fail --include-fragments
--root-dir docs/_site-pdf
docs/_site-pdf/book.html