Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

docs: publish redirects to commit-check.com ahead of archiving (#14) #60

docs: publish redirects to commit-check.com ahead of archiving (#14)

docs: publish redirects to commit-check.com ahead of archiving (#14) #60

Workflow file for this run

name: Deploy redirects
# This site moved to https://commit-check.com. What this repository publishes
# is a set of redirect stubs, built by scripts/build_redirects.py rather than
# by mkdocs.
#
# The deploy matters more than usual: once this repository is archived, Actions
# stop running and Pages keeps serving the last artifact indefinitely. The
# redirect map is therefore checked on every run — a URL left out is a link
# that breaks permanently.
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.x'
# mkdocs is still needed: the check builds the old site and compares the
# URLs it produces against the redirect map.
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest -r docs/requirements.txt
- name: Check every old URL still has a forwarding address
run: pytest tests/ -q
- name: Build redirects
run: python scripts/build_redirects.py
- name: Upload redirects as artifact
uses: actions/upload-pages-artifact@v5
with:
name: ${{ github.event.repository.name }}_docs
path: ${{ github.workspace }}/site
deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [build]
permissions:
# to deploy to Pages
pages: write
# to verify the deployment originates from an appropriate source
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
with:
artifact_name: ${{ github.event.repository.name }}_docs