17 Commits

Author SHA1 Message Date
279a15f6ad fix
Some checks failed
CI - Docs build check / build-check (push) Successful in 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
Build & publish docs (rc + release) / build (push) Successful in 5s
Build & publish docs (rc + release) / release (push) Successful in 2s
Build & publish docs (rc + release) / deploy (push) Failing after 3s
2026-02-05 14:09:23 -06:00
69a34a5a82 test
Some checks failed
CI - Docs build check / build-check (push) Successful in 9s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
Build & publish docs (rc + release) / build (push) Successful in 5s
Build & publish docs (rc + release) / release (push) Successful in 4s
Build & publish docs (rc + release) / deploy (push) Failing after 1s
2026-02-05 14:03:24 -06:00
7d7dbe5354 test
Some checks failed
CI - Docs build check / build-check (push) Successful in 13s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
Build & publish docs (rc + release) / build (push) Successful in 5s
Build & publish docs (rc + release) / release (push) Successful in 2s
Build & publish docs (rc + release) / deploy (push) Failing after 2s
2026-02-05 13:58:19 -06:00
ddb44e9846 test
Some checks failed
CI - Docs build check / build-check (push) Successful in 7s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
Build & publish docs (rc + release) / build (push) Successful in 6s
Build & publish docs (rc + release) / release (push) Successful in 2s
Build & publish docs (rc + release) / deploy (push) Successful in 1s
2026-02-05 13:47:59 -06:00
f1f4a69bd1 oops
Some checks failed
CI - Docs build check / build-check (push) Successful in 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
Build & publish docs (rc + release) / build (push) Failing after 4s
Build & publish docs (rc + release) / release (push) Has been skipped
Build & publish docs (rc + release) / deploy (push) Has been skipped
2026-02-05 13:40:06 -06:00
dea9106556 test
Some checks failed
CI - Docs build check / build-check (push) Successful in 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
2026-02-05 13:35:51 -06:00
f7345b5433 test
Some checks failed
CI - Docs build check / build-check (push) Failing after 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
2026-02-05 13:30:06 -06:00
a5640d0e02 oops more errors 2026-02-05 13:25:56 -06:00
50252ece04 oops branch name wrong 2026-02-05 13:18:55 -06:00
0fa737e74b test 2026-02-05 13:17:33 -06:00
973dbefabb test 2026-02-05 13:01:37 -06:00
afd82d071c test 2026-02-05 12:44:38 -06:00
ead328c075 fix env
Some checks failed
CI - Docs build check / build-check (push) Failing after 7s
2026-02-05 09:49:35 -06:00
155c9a4222 fix strict var
All checks were successful
CI - Docs build check / build-check (push) Successful in 8s
2026-02-05 09:46:32 -06:00
bdbce0664b fix validation
Some checks failed
CI - Docs build check / build-check (push) Failing after 8s
2026-02-05 09:42:36 -06:00
c185079bf1 fix
All checks were successful
CI - Docs build check / build-check (push) Successful in 9s
2026-02-05 09:28:36 -06:00
039228ab99 update ci
All checks were successful
CI - Docs build check / build-check (push) Successful in 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Successful in 6s
2026-02-05 09:24:58 -06:00
6 changed files with 240 additions and 18 deletions

View File

@@ -1,19 +1,26 @@
name: CI - Docs build check
on:
pull_request:
branches-ignore:
- gh-pages
push:
push:
branches:
- main
- develop
- release-candidate
workflow_dispatch:
permissions:
contents: read
env:
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
MKDOCS_CONFIG: mkdocs/mkdocs.yml
MKDOCS_OFFLINE: false
CSPELL_CONFIG: tools/spellcheck/cspell.yml
CSPELL_TARGETS: docs/**/*.md README.md
jobs:
build-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -27,9 +34,8 @@ jobs:
run: |
set -euo pipefail
npx --yes cspell \
--config tools/spellcheck/cspell.yml \
"docs/**/*.md" \
README.md
--config ${CSPELL_CONFIG} \
${CSPELL_TARGETS}
- name: Install build dependencies
run: |
@@ -37,8 +43,15 @@ jobs:
pip install -r mkdocs/requirements.txt
- name: MkDocs build (strict default)
run: |
set -euo pipefail
# Default not strict on if unset
export MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
tools/build.sh --config mkdocs/mkdocs.yml
echo "Strict is set to ${MKDOCS_STRICT}"
FLAGS=()
if [ "${MKDOCS_STRICT}" = "true" ]; then
FLAGS+=(--strict)
fi
MKDOCS_OUTPUT_DIR="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/dist"
mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${MKDOCS_OUTPUT_DIR}"

74
.github/workflows/deploy-pages.yml vendored Normal file
View File

@@ -0,0 +1,74 @@
name: Release - Build and publish docs
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout (tag)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
set -euo pipefail
pip install -r mkdocs/requirements.txt
- name: CI gate build (strict)
env:
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT }}
run: |
set -euo pipefail
export MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
tools/mkdocs_build.sh --config mkdocs/mkdocs.yml
- name: Package site (non-strict)
run: |
set -euo pipefail
export MKDOCS_STRICT="false"
scripts/package_site.sh "${GITHUB_REF_NAME}" --config mkdocs/mkdocs.yml --dist "${RUNNER_TEMP}/dist"
- name: Publish release (GitHub)
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: |
${{ runner.temp }}/dist/${{ github.ref_name }}.zip
- name: Remove RC preview from gh-pages (optional cleanup)
run: |
set -euo pipefail
git fetch origin gh-pages:gh-pages || true
if git show-ref --verify --quiet refs/heads/gh-pages; then
git switch gh-pages
else
echo "No gh-pages branch; nothing to clean."
exit 0
fi
if [ -d rc ]; then
rm -rf rc
git add -A
git config user.name "actions-bot"
git config user.email "actions-bot@users.noreply.github.com"
git commit -m "Remove RC preview after release ${GITHUB_REF_NAME}" || echo "No changes to commit"
git push origin gh-pages
else
echo "No rc/ directory present; nothing to delete."
fi

136
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,136 @@
name: Build & publish docs (rc + release)
on:
push:
tags:
- "rc*"
- "v*"
workflow_dispatch:
permissions:
contents: read
env:
MKDOCS_CONFIG: mkdocs/mkdocs.yml
MKDOCS_OUTPUT_DIR: ${{ runner.temp }}/dist
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deps
run: |
set -euo pipefail
pip install -r mkdocs/requirements.txt
- name: Build docs (strict gate)
run: |
set -euo pipefail
FLAGS=()
if [ "${MKDOCS_STRICT}" = "true" ]; then
FLAGS+=(--strict)
fi
mkdir -p "${MKDOCS_OUTPUT_DIR}"
OFFLINE="${OFFLINE:-true}" mkdocs build \
"${FLAGS[@]}" \
-f "${MKDOCS_CONFIG}" \
-d "${MKDOCS_OUTPUT_DIR}/offline"
mkdocs build \
"${FLAGS[@]}" \
-f "${MKDOCS_CONFIG}" \
-d "${MKDOCS_OUTPUT_DIR}/dist"
- name: Zip site
run: |
set -euo pipefail
cd "${MKDOCS_OUTPUT_DIR}"
zip -r "${GITHUB_REF_NAME}.zip" "./offline"
release:
runs-on: ubuntu-latest
needs: build
steps:
# -------------------------
# RC-only step
# -------------------------
- name: Publish prerelease
if: startsWith(github.ref_name, 'rc')
uses: softprops/action-gh-release@v2
with:
prerelease: true
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
body: |
Release candidate preview (if deployed): /rc/
files: |
${{ runner.temp }}/${{ github.ref_name }}.zip
# -------------------------
# Final release-only step
# -------------------------
- name: Publish release
if: startsWith(github.ref_name, 'v')
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: |
${{ runner.temp }}/${{ github.ref_name }}.zip
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout (tag)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout gh-pages branch
run: |
set -euo pipefail
git fetch origin gh-pages:gh-pages || true
if git show-ref --verify --quiet refs/heads/gh-pages; then
git switch gh-pages
else
git switch --orphan gh-pages
rm -rf ./*
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit --allow-empty -m "Initialize gh-pages"
fi
- name: Publish release
run: |
set -euo pipefail
rm ./* ./.* || true
cp -a "${MKDOCS_OUTPUT_DIR}/dist/." ""
git add -A
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Deploy release ${GITHUB_REF_NAME}" || echo "No changes to commit"
git push origin gh-pages
- name: Publish RC preview under /rc/<tag>/
run: |
set -euo pipefail
rm -rf "rc"* || true
mkdir -p "rc/"
cp -a "${MKDOCS_OUTPUT_DIR}/dist/." "rc/"
git add -A
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Deploy RC preview ${GITHUB_REF_NAME}" || echo "No changes to commit"
git push origin gh-pages

View File

@@ -1,5 +0,0 @@
---
title: Chicago Metropolitan Baseball Association
subtitle: Constitution and By-Laws
date: 2024-06-06
---

View File

@@ -36,4 +36,8 @@ plugins:
- enumerate-headings:
toc_depth: 2
exclude:
- index.md
- index.md
validation:
links:
anchors: warn #this defaults to info, but it will cause broken links in anchor headers

View File

@@ -11,5 +11,5 @@ STRICT_FLAG=""
if [ "${MKDOCS_STRICT}" = "true" ]; then
STRICT_FLAG="--strict"
fi
echo "MKDOCS_STRICT: $MKDOCS_STRICT, STRICT_FLAG: $STRICT_FLAG"
mkdocs build ${STRICT_FLAG} -f $MKDOCS_CONFIG -d $OUTPUT_DIR