Skip to content

Book formatting fixes. #101

Book formatting fixes.

Book formatting fixes. #101

Workflow file for this run

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 Python for link checks
uses: actions/setup-python@v5
with:
python-version: '3.14'
cache: 'pip'
- name: Install Python deps
run: pip install -r requirements.txt
- name: Check online links (check_links.py)
# `--fallback-extensions html` mirrors what GitHub Pages does at request time:
# an extensionless URL like `/FAQ` is served as `/FAQ.html`. This workflow's
# Jekyll build runs without --baseurl (no Pages prefix), so no --base-path is
# needed -- contrast with jekyll-gh-pages.yml.
run: >-
python scripts/check_links.py
--offline --include-fragments
--fallback-extensions html
--index-files 'index.html,.'
--root-dir docs/_site
docs/_site
- name: Check offline links (check_links.py)
run: >-
python scripts/check_links.py
--offline --include-fragments
--index-files index.html
--root-dir docs/_site-offline
docs/_site-offline
- name: Check for surviving live-site links in offline tree
# Flags any https://docs.twinbasic.com/<path> reference left in
# _site-offline/ HTML outside <code>/<pre> blocks. After offlinify
# strips the jekyll-seo-tag block, anything surviving is a source
# link that points at the live site instead of using a relative or
# /tB/... permalink that resolves locally. The bare root URL
# (https://docs.twinbasic.com[/]) is exempt -- intentional "go to
# the live site" links are allowed.
run: python scripts/check_offline_live_links.py
- name: Check book links (informational)
# Failures do not block the build. The book still has absolute
# intra-site URLs that the chapter transform has not yet rewritten
# and some fragment anchors that are not yet generated. Tracked here
# for visibility until those are fixed.
continue-on-error: true
run: >-
python scripts/check_links.py
--offline --include-fragments
--root-dir docs/_site-pdf
docs/_site-pdf/book.html