Skip to content

Justthedocs performance fixes and book content gathering. #97

Justthedocs performance fixes and book content gathering.

Justthedocs performance fixes and book content gathering. #97

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: Check online links (lychee)
uses: lycheeverse/lychee-action@v2
with:
args: >-
--offline --include-fragments
--fallback-extensions html
--index-files 'index.html,.'
--root-dir ${{ github.workspace }}/docs/_site
./_site
workingDirectory: ./docs
fail: true
- name: Set up Python for offline link check
uses: actions/setup-python@v5
with:
python-version: '3.14'
cache: 'pip'
- name: Install Python deps
run: pip install -r requirements.txt
- 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