Compare commits
2 Commits
release-ca
...
c934f7e947
| Author | SHA1 | Date | |
|---|---|---|---|
|
c934f7e947
|
|||
|
eaf916443c
|
48
.github/workflows/ci-docs.yml
vendored
48
.github/workflows/ci-docs.yml
vendored
@@ -1,49 +1,57 @@
|
|||||||
name: CI - Docs build check
|
name: CI - Docs build check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
push:
|
||||||
branches: [release-candidate]
|
branches:
|
||||||
push:
|
- main
|
||||||
branches: [release-candidate]
|
- develop
|
||||||
|
- release-candidate
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
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:
|
jobs:
|
||||||
build-check:
|
build-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
# if: false
|
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
# cache: "pip"
|
|
||||||
# cache-dependency-path: mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Spellcheck
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
npx --yes cspell \
|
||||||
|
--config ${CSPELL_CONFIG} \
|
||||||
|
${CSPELL_TARGETS}
|
||||||
|
|
||||||
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
pip install -r mkdocs/requirements.txt
|
pip install -r mkdocs/requirements.txt
|
||||||
|
|
||||||
- name: MkDocs build
|
- name: MkDocs build (strict default)
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
echo "MKDOCS_STRICT: $MKDOCS_STRICT"
|
echo "Strict is set to ${MKDOCS_STRICT}"
|
||||||
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
FLAGS=()
|
||||||
STRICT_FLAG=""
|
|
||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
|
||||||
STRICT_FLAG="--strict"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OFFLINE=true mkdocs build ${STRICT_FLAG} -f mkdocs/mkdocs.yml -d $RUNNER_TEMP/
|
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}"
|
||||||
78
.github/workflows/deploy-main-pages.yml
vendored
78
.github/workflows/deploy-main-pages.yml
vendored
@@ -1,78 +0,0 @@
|
|||||||
name: Deploy main to GitHub Pages (stable)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-main-pages:
|
|
||||||
if: ${{ env.ENABLE_DEPLOY == 'true' && env.ACT != 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout (main)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.13"
|
|
||||||
cache: "pip"
|
|
||||||
cache-dependency-path: mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
pip install -r mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: Build (MKDOCS_STRICT)
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
|
||||||
STRICT_FLAG=""
|
|
||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
|
||||||
STRICT_FLAG="--strict"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OFFLINE=true mkdocs build ${STRICT_FLAG} -f mkdocs/mkdocs.yml -d site_build
|
|
||||||
|
|
||||||
- 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 stable site to root (preserve rc/)
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
mkdir -p _keep
|
|
||||||
if [ -d rc ]; then cp -a rc _keep/; fi
|
|
||||||
|
|
||||||
rm -rf ./*
|
|
||||||
if [ -d _keep/rc ]; then mv _keep/rc ./rc; fi
|
|
||||||
rm -rf _keep
|
|
||||||
|
|
||||||
cp -a ../site_build/. .
|
|
||||||
|
|
||||||
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 stable site from main" || echo "No changes to commit"
|
|
||||||
git push origin gh-pages
|
|
||||||
91
.github/workflows/deploy-rc-pages.yml
vendored
91
.github/workflows/deploy-rc-pages.yml
vendored
@@ -1,91 +0,0 @@
|
|||||||
name: Deploy RC preview to GitHub Pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*-rc.*"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-rc-pages:
|
|
||||||
if: ${{ env.ENABLE_DEPLOY == 'true' && env.CI_PROVIDER == 'github' && env.ACT != 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout (tag)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Ensure tag commit is on release-candidate
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
git fetch origin release-candidate:refs/remotes/origin/release-candidate
|
|
||||||
if ! git merge-base --is-ancestor "${GITHUB_SHA}" "origin/release-candidate"; then
|
|
||||||
echo "ERROR: Tagged commit ${GITHUB_SHA} is not on release-candidate. Refusing RC deploy."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.13"
|
|
||||||
cache: "pip"
|
|
||||||
cache-dependency-path: mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
pip install -r mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: Build (MKDOCS_STRICT)
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
|
||||||
STRICT_FLAG=""
|
|
||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
|
||||||
STRICT_FLAG="--strict"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OFFLINE=true mkdocs build ${STRICT_FLAG} -f mkdocs/mkdocs.yml -d site_build
|
|
||||||
|
|
||||||
- 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 RC preview under /rc/<tag>/
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
REF="${{ github.ref_name }}"
|
|
||||||
mkdir -p "rc/${REF}"
|
|
||||||
rm -rf "rc/${REF:?}/"* || true
|
|
||||||
cp -a ../site_build/. "rc/${REF}/"
|
|
||||||
|
|
||||||
mkdir -p rc
|
|
||||||
if [ ! -f rc/index.html ]; then
|
|
||||||
cat > rc/index.html << 'EOF'
|
|
||||||
<!doctype html><meta charset="utf-8"><title>RC Previews</title>
|
|
||||||
<h1>RC Previews</h1><p>Browse rc/<tag>/</p>
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
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 ${REF}" || echo "No changes to commit"
|
|
||||||
git push origin gh-pages
|
|
||||||
88
.github/workflows/prerelease-docs.yml
vendored
88
.github/workflows/prerelease-docs.yml
vendored
@@ -1,88 +0,0 @@
|
|||||||
name: Pre-release - Build and publish docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prerelease:
|
|
||||||
if: >
|
|
||||||
startsWith(github.ref_name, 'v')
|
|
||||||
&& contains(github.ref_name, '-rc')}}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout (tag)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Ensure tag commit is on release-candidate
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
git fetch origin release-candidate:refs/remotes/origin/release-candidate
|
|
||||||
if ! git merge-base --is-ancestor "${GITHUB_SHA}" "origin/release-candidate"; then
|
|
||||||
echo "ERROR: Tagged commit ${GITHUB_SHA} is not on release-candidate. Refusing prerelease."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.13"
|
|
||||||
cache: "pip"
|
|
||||||
cache-dependency-path: mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
pip install -r mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: CI gate (MKDOCS_STRICT)
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
|
||||||
STRICT_FLAG=""
|
|
||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
|
||||||
STRICT_FLAG="--strict"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OFFLINE=true mkdocs build ${STRICT_FLAG} -f mkdocs/mkdocs.yml -d $RUNNER_TEMP
|
|
||||||
|
|
||||||
- name: Build artifact (non-strict)
|
|
||||||
env:
|
|
||||||
MKDOCS_STRICT: "false"
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
|
||||||
STRICT_FLAG=""
|
|
||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
|
||||||
STRICT_FLAG="--strict"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "${RUNNER_TEMP}/dist"
|
|
||||||
OFFLINE=true mkdocs build ${STRICT_FLAG} -f mkdocs/mkdocs.yml -d "${RUNNER_TEMP}/dist/${{ github.ref_name }}"
|
|
||||||
|
|
||||||
- name: Zip artifact
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
cd "${RUNNER_TEMP}/dist"
|
|
||||||
zip -r "${{ github.ref_name }}.zip" "./${{ github.ref_name }}"
|
|
||||||
|
|
||||||
- name: Publish prerelease (skip on act)
|
|
||||||
if: ${{ env.ENABLE_RELEASE == 'true' && env.ACT != 'true' }}
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
prerelease: true
|
|
||||||
files: |
|
|
||||||
${{ runner.temp }}/dist/${{ github.ref_name }}.zip
|
|
||||||
86
.github/workflows/release-docs.yml
vendored
86
.github/workflows/release-docs.yml
vendored
@@ -1,86 +0,0 @@
|
|||||||
name: Release - Build and publish docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
if: >
|
|
||||||
startsWith(github.ref_name, 'v')
|
|
||||||
&& !contains(github.ref_name, '-rc')}}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout (tag)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Ensure tag commit is on main
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
git fetch origin main:refs/remotes/origin/main
|
|
||||||
if ! git merge-base --is-ancestor "${GITHUB_SHA}" "origin/main"; then
|
|
||||||
echo "ERROR: Tagged commit ${GITHUB_SHA} is not on main. Refusing release."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.13"
|
|
||||||
cache: "pip"
|
|
||||||
cache-dependency-path: mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
pip install -r mkdocs/requirements.txt
|
|
||||||
|
|
||||||
- name: CI gate (MKDOCS_STRICT)
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
|
||||||
STRICT_FLAG=""
|
|
||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
|
||||||
STRICT_FLAG="--strict"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OFFLINE=true mkdocs build ${STRICT_FLAG} -f mkdocs/mkdocs.yml -d $RUNNER_TEMP
|
|
||||||
|
|
||||||
- name: Build artifact (non-strict)
|
|
||||||
env:
|
|
||||||
MKDOCS_STRICT: "false"
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
|
||||||
STRICT_FLAG=""
|
|
||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
|
||||||
STRICT_FLAG="--strict"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "${RUNNER_TEMP}/dist"
|
|
||||||
OFFLINE=true mkdocs build ${STRICT_FLAG} -f mkdocs/mkdocs.yml -d "${RUNNER_TEMP}/dist/${{ github.ref_name }}"
|
|
||||||
|
|
||||||
- name: Zip artifact
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
cd "${RUNNER_TEMP}/dist"
|
|
||||||
zip -r "${{ github.ref_name }}.zip" "./${{ github.ref_name }}"
|
|
||||||
|
|
||||||
- name: Publish release (skip on act; allowed on gitea)
|
|
||||||
if: ${{ env.ENABLE_RELEASE == 'true' && env.ACT != 'true' }}
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
${{ runner.temp }}/dist/${{ github.ref_name }}.zip
|
|
||||||
114
.github/workflows/release.yml
vendored
Normal file
114
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
name: Build & publish docs (rc + release)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "rc*"
|
||||||
|
- "v*"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
MKDOCS_CONFIG: mkdocs/mkdocs.yml
|
||||||
|
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
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 deps
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
pip install -r mkdocs/requirements.txt
|
||||||
|
|
||||||
|
- name: Build docs (normal + offline, strict gate)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
FLAGS=()
|
||||||
|
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
||||||
|
FLAGS+=(--strict)
|
||||||
|
fi
|
||||||
|
|
||||||
|
OUT_BASE="${RUNNER_TEMP}/mkdocs_out"
|
||||||
|
SITE="${OUT_BASE}/site"
|
||||||
|
SITE_OFFLINE="${OUT_BASE}/site_offline"
|
||||||
|
|
||||||
|
rm -rf "${OUT_BASE}"
|
||||||
|
mkdir -p "${SITE}" "${SITE_OFFLINE}"
|
||||||
|
|
||||||
|
mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE}"
|
||||||
|
OFFLINE=true mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE_OFFLINE}"
|
||||||
|
|
||||||
|
- name: Zip offline site
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
cd "${RUNNER_TEMP}/mkdocs_out"
|
||||||
|
zip -r "${GITHUB_REF_NAME}.zip" site_offline
|
||||||
|
|
||||||
|
- 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 }}/mkdocs_out/${{ github.ref_name }}.zip
|
||||||
|
|
||||||
|
- 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 }}/mkdocs_out/${{ github.ref_name }}.zip
|
||||||
|
|
||||||
|
- name: Checkout gh-pages branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: gh-pages
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Deploy release to gh-pages root
|
||||||
|
if: startsWith(github.ref_name, 'v')
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
rm -rf ./*
|
||||||
|
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. .
|
||||||
|
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: Deploy RC preview to /rc/
|
||||||
|
if: startsWith(github.ref_name, 'rc')
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
rm -rf rc
|
||||||
|
mkdir -p rc
|
||||||
|
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. rc/
|
||||||
|
printf '{"tag":"%s"}\n' "${GITHUB_REF_NAME}" > rc/rc.json
|
||||||
|
|
||||||
|
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
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -7,13 +7,8 @@
|
|||||||
/dataSources/
|
/dataSources/
|
||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
|
|
||||||
# Vitrtual Environments
|
|
||||||
.venv/
|
|
||||||
venv/
|
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
*.bbprojectd
|
*.bbprojectd
|
||||||
.vscode
|
|
||||||
|
|
||||||
# Backups created by aspell
|
# Backups created by aspell
|
||||||
*.md.bak*
|
*.md.bak*
|
||||||
|
|||||||
70
README.md
70
README.md
@@ -1,95 +1,27 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://github.com/anthonyscorrea/silver-memory/blob/a712bca2516c3e860f2c61ea383a3132ead0614b/cmba-logo.svg" width="200">
|
<img src="docs/assets/cmba-logo.svg" width="200">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# CMBA Constitution and Bylaws
|
# CMBA Constitution and Bylaws
|
||||||
|
|
||||||
The Constitution and Bylaws for the baseball league known as the [Chicago Metropolitan Baseball Association (CMBA)](#about-the-cmba).
|
The Constitution and Bylaws for the baseball league known as the [Chicago Metropolitan Baseball Association (CMBA)](#about-the-cmba).
|
||||||
|
|
||||||
The compiled, published text can be found in the following formats:
|
|
||||||
- [PDF](build/cmba-bylaws.pdf)
|
|
||||||
- [HTML](build/cmba-bylaws.html)
|
|
||||||
- [ePUB](build/cmba-bylaws.epub)
|
|
||||||
|
|
||||||
The source text for this document can be found in Markdown format in [src/cmba-bylaws.md](src/cmba-bylaws.md).
|
The source text for this document can be found in Markdown format in [src/cmba-bylaws.md](src/cmba-bylaws.md).
|
||||||
|
|
||||||
## Building from source
|
## Building from source
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
Building from source requires:
|
|
||||||
- [Pandoc](https://pandoc.org)
|
|
||||||
- [GNU Make](https://www.gnu.org/software/make/)
|
|
||||||
|
|
||||||
### Steps
|
### Steps
|
||||||
1. Download the latest release or clone the repo:
|
|
||||||
```
|
|
||||||
git clone https://github.com/anthonyscorrea/cmba-bylaws.git
|
|
||||||
```
|
|
||||||
2. Navigate to the root directory:
|
|
||||||
```
|
|
||||||
cd cmba-bylaws-master
|
|
||||||
```
|
|
||||||
3. Publish into desired format:
|
|
||||||
```
|
|
||||||
make {format}
|
|
||||||
```
|
|
||||||
were `{format}` is one of the below:
|
|
||||||
- All [default]: `make all` or `make`
|
|
||||||
- PDF: `make pdf`
|
|
||||||
- html: `make html`
|
|
||||||
- epub: `make epub`
|
|
||||||
5. Built files will be in the `build/` directory
|
|
||||||
|
|
||||||
## Markdown formatting
|
|
||||||
|
|
||||||
- `#` or `h1` is used for either "Constitution" or "Bylaws". They are not numbered, necessitating an `{.unnumbered}` class.
|
|
||||||
- Note: to get the numbering to match existing convention, a [Lua filter](https://github.com/jgm/pandoc/issues/5071#issuecomment-856918980) was required, see [jgm/pandoc#5701](https://github.com/jgm/pandoc/issues/5071)
|
|
||||||
- `##` or `h2` is used for sections
|
|
||||||
- `###` or `h3` is used for subsections
|
|
||||||
|
|
||||||
## Metadata
|
|
||||||
|
|
||||||
Metadata is stored in the `metadata.yml` file.
|
|
||||||
|
|
||||||
## Project history
|
## Project history
|
||||||
|
|
||||||
The constitution and bylaws were modernized in 2021, using Google Docs. This project brings that effort into Git and Github. Previous commits show a generated plain-text history of the changes prior to this project (thanks to [gitdriver](https://github.com/larsks/gitdriver)), with the first being the version from 2016.
|
The constitution and bylaws were modernized in 2021, using Google Docs. This project brings that effort into Git and Github. Previous commits show a generated plain-text history of the changes prior to this project (thanks to [gitdriver](https://github.com/larsks/gitdriver)), with the first being the version from 2016.
|
||||||
|
|
||||||
## Spell-checking
|
## Spell-checking
|
||||||
Spell-checking is performed on the pre-commit via [.spell-check/git-spell-check](.spell-check/git-spell-check) (courtesy of [mprpic/git-spell-check](https://github.com/mprpic/git-spell-check))
|
|
||||||
|
|
||||||
You can manually run spell-checking of all markdown files by running the script (requires [aspell](http://aspell.net)):
|
|
||||||
|
|
||||||
```console
|
|
||||||
./.spell-check/spell-check
|
|
||||||
```
|
|
||||||
|
|
||||||
Should you want to bypass the pre-commit hook (though not recommended), you can commit with
|
|
||||||
```console
|
|
||||||
git commit --no-verify".
|
|
||||||
```
|
|
||||||
|
|
||||||
## GitHub Pages
|
## GitHub Pages
|
||||||
|
|
||||||
The html output can be hosted on GitHub Pages. Currently the site is hosted at the branch [gh-pages](https://github.com/anthonyscorrea/cmba-bylaws/tree/gh-pages). To update this page, you should:
|
|
||||||
|
|
||||||
1. First build from the main branch and build html
|
|
||||||
```console
|
|
||||||
git clone https://github.com/anthonyscorrea/cmba-bylaws.git
|
|
||||||
make html
|
|
||||||
```
|
|
||||||
2. Then clone the gh-pages branch and replace `index.html` with the updated page.
|
|
||||||
```console
|
|
||||||
git clone https://github.com/anthonyscorrea/cmba-bylaws.git --branch gh-pages cmba-bylaws-gh-pages
|
|
||||||
cp ../cmba-bylaws/build/cmba-bylaws.html ./cmba-bylaws-gh-pages/index.html
|
|
||||||
git push origin
|
|
||||||
```
|
|
||||||
|
|
||||||
## To-Do
|
|
||||||
- [X] Spell Checking
|
|
||||||
- [ ] Remove dependence on make, verify Windows support
|
|
||||||
|
|
||||||
## About the CMBA
|
## About the CMBA
|
||||||
This baseball league known as the [Chicago Metropolitan Baseball Association (CMBA)](http://cmbabaseball.com) has been formed for the purpose of providing the finest amateur baseball league in the State of Illinois and Midwest; a league where an up and coming young prospect for professional baseball may play and develop; where the talented veteran player can enjoy playing among the best competition; and bring friendship and sportsmanship to the Association.
|
This baseball league known as the [Chicago Metropolitan Baseball Association (CMBA)](http://cmbabaseball.com) has been formed for the purpose of providing the finest amateur baseball league in the State of Illinois and Midwest; a league where an up and coming young prospect for professional baseball may play and develop; where the talented veteran player can enjoy playing among the best competition; and bring friendship and sportsmanship to the Association.
|
||||||
|
|
||||||
|
|||||||
154
RELEASING.md
154
RELEASING.md
@@ -1,154 +0,0 @@
|
|||||||
# Technical Release & Automation Notes
|
|
||||||
|
|
||||||
> ⚠️ This document describes **technical automation and versioning**
|
|
||||||
> used by the repository (CI/CD, tags, and deployments).
|
|
||||||
>
|
|
||||||
> It does **not** define:
|
|
||||||
> - the organizational process for approving bylaws or constitutional changes
|
|
||||||
> - who is authorized to make those changes
|
|
||||||
> - when changes are considered “official” by the organization
|
|
||||||
>
|
|
||||||
> Those governance decisions within the organization’s constitution.
|
|
||||||
|
|
||||||
This document exists solely to explain how **Git version tags, automated checks,
|
|
||||||
and publishing workflows** are wired together so that future maintainers
|
|
||||||
(dozens of months from now) do not accidentally trigger or break them.
|
|
||||||
|
|
||||||
# Release & CI Process
|
|
||||||
|
|
||||||
This repository uses a deliberately strict and explicit release process.
|
|
||||||
It exists to prevent accidental releases, deployments, or CI runs.
|
|
||||||
|
|
||||||
If you are changing tags, workflows, or branches, read this first.
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## Branches
|
|
||||||
|
|
||||||
- `development`
|
|
||||||
- Day-to-day work
|
|
||||||
- No releases or deployments happen from this branch
|
|
||||||
|
|
||||||
- `release-candidate`
|
|
||||||
- Stabilization branch
|
|
||||||
- CI runs here with strict checks
|
|
||||||
- Release candidates are tagged from here
|
|
||||||
|
|
||||||
- `main`
|
|
||||||
- Stable, releasable state
|
|
||||||
- Final releases are tagged from here
|
|
||||||
- Stable GitHub Pages content is deployed from here
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## Tag Naming Policy
|
|
||||||
|
|
||||||
### Final Releases
|
|
||||||
- Tags **must** start with `v`
|
|
||||||
- Tags **must not** contain `-rc`
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
- `v2026.1.0`
|
|
||||||
- `v1.0.0`
|
|
||||||
|
|
||||||
### Release Candidates
|
|
||||||
- Tags **must** start with `v`
|
|
||||||
- Tags **must** contain `-rc`
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
- `v2026.1.0-rc.1`
|
|
||||||
- `v1.0.0-rc.2`
|
|
||||||
|
|
||||||
This naming policy is intentional and is enforced by CI.
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## CI and Workflows Overview
|
|
||||||
|
|
||||||
| Workflow | Trigger | Purpose |
|
|
||||||
|-------------------|----------------------------------|----------------------------------------|
|
|
||||||
| CI Docs | Push / PR to `release-candidate` | Strict MkDocs build validation |
|
|
||||||
| Prerelease | Tag `v*` containing `-rc` | Build and publish prerelease artifacts |
|
|
||||||
| Release | Tag `v*` not containing `-rc` | Build and publish final release |
|
|
||||||
| RC Pages Deploy | RC tag | Publish preview docs under `/rc//` |
|
|
||||||
| Main Pages Deploy | Push to `main` | Publish stable docs to root |
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## Why both release workflows trigger on `v*`
|
|
||||||
|
|
||||||
GitHub Actions does **not** support negative tag filters.
|
|
||||||
Because of this:
|
|
||||||
|
|
||||||
- Both release and prerelease workflows trigger on `v*`
|
|
||||||
- Each workflow uses a job-level `if:` to decide whether it should run
|
|
||||||
|
|
||||||
This ensures:
|
|
||||||
- Symmetry between workflows
|
|
||||||
- Clear, explicit logic
|
|
||||||
- No reliance on fragile glob patterns
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## Safety Checks (Intentional Redundancy)
|
|
||||||
|
|
||||||
Releases and deployments are guarded by **multiple independent checks**:
|
|
||||||
|
|
||||||
1. **Tag name checks**
|
|
||||||
- Release vs prerelease is decided by presence of `-rc`
|
|
||||||
|
|
||||||
2. **Branch ancestry checks**
|
|
||||||
- Final releases must be reachable from `main`
|
|
||||||
- RC releases must be reachable from `release-candidate`
|
|
||||||
|
|
||||||
3. **Strict MkDocs CI**
|
|
||||||
- Controlled by `MKDOCS_STRICT` (defaults to true)
|
|
||||||
|
|
||||||
4. **Environment guards**
|
|
||||||
- Releases are skipped when running under `act`
|
|
||||||
- Deployments only run on GitHub, never on Gitea or act
|
|
||||||
|
|
||||||
This redundancy is intentional.
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## Environment Variables
|
|
||||||
|
|
||||||
These variables control CI and release behavior:
|
|
||||||
|
|
||||||
| Variable | Purpose |
|
|
||||||
|-------------------|-------------------------------------|
|
|
||||||
| `MKDOCS_STRICT` | Enable/disable strict MkDocs builds |
|
|
||||||
| `ENABLE_RELEASE` | Master switch for releases |
|
|
||||||
| `ENABLE_DEPLOY` | Master switch for deployments |
|
|
||||||
| `CI_PROVIDER` | `github`, `gitea`, or `act` |
|
|
||||||
| Main Pages Deploy | Push to `main` |
|
|
||||||
|
|
||||||
Defaults are defined in repository settings.
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## Common Mistakes (and What Happens)
|
|
||||||
|
|
||||||
- Tagging `v2026.1.0` on a non-`main` commit
|
|
||||||
→ Release workflow runs but fails early with a clear error
|
|
||||||
|
|
||||||
- Tagging `v2026.1.0-rc.1` on `main`
|
|
||||||
→ Prerelease workflow runs but branch check fails
|
|
||||||
|
|
||||||
- Running workflows locally with `act`
|
|
||||||
→ Builds run, but no release or deploy occurs
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
## Changing This Process
|
|
||||||
|
|
||||||
If you change:
|
|
||||||
- Tag patterns
|
|
||||||
- Branch names
|
|
||||||
- Workflow triggers
|
|
||||||
- CI guard logic
|
|
||||||
|
|
||||||
Update this document **and** the workflows together.
|
|
||||||
|
|
||||||
This process is designed to be boring, explicit, and safe.
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Constitution {.unnumbered}
|
# Constitution
|
||||||
|
|
||||||
## Name; Objective
|
## Name; Objective
|
||||||
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
# Bylaws
|
|
||||||
|
# By-Laws
|
||||||
|
|
||||||
## Definition; Amendments
|
## Definition; Amendments
|
||||||
These By-Laws shall stand as the official rules of the CMBA.
|
These By-Laws shall stand as the official rules of the CMBA.
|
||||||
All Association members shall abide by and are subject to, without exception, all rules and regulations as outlined in the Constitution and By-Laws as well as the authority of the Association President, in accordance with [Subjectivity](#subjectivity)
|
All Association members shall abide by and are subject to, without exception, all rules and regulations as outlined in the Constitution and By-Laws as well as the authority of the Association President, in accordance with [Subjectivity](#subjectivity)
|
||||||
@@ -191,160 +193,6 @@ All players in the CMBA are expected to pay their team fees. Players will not be
|
|||||||
### Free Agents
|
### Free Agents
|
||||||
A player must inform the League President and his manager no later than February 15 of the upcoming season if he wishes to leave his team and become a free agent. After this he is free to play for another team in the CMBA. A manager may waive this deadline for an individual player at the manager’s discretion. If the player fails to notify as specified, that player shall be disqualified from playing on another CMBA team for that season.
|
A player must inform the League President and his manager no later than February 15 of the upcoming season if he wishes to leave his team and become a free agent. After this he is free to play for another team in the CMBA. A manager may waive this deadline for an individual player at the manager’s discretion. If the player fails to notify as specified, that player shall be disqualified from playing on another CMBA team for that season.
|
||||||
|
|
||||||
## General Play
|
|
||||||
|
|
||||||
### Playing Rules
|
|
||||||
Except where specified in this document, the CMBA shall follow the Official Baseball Rules of Major League Baseball.
|
|
||||||
|
|
||||||
The CMBA shall not incorporate the following rules of Major League Baseball:
|
|
||||||
|
|
||||||
- Rule 4.03(c)(4) specifying limitations on when a position player can pitch.
|
|
||||||
- Rule 5.02(c) specifying limitations on infielder placement.
|
|
||||||
- Rule 7.01(b) incorporating the parameters of the Extra Innings Rule, which includes starting each half-inning following the last regulation inning with a runner on second base.
|
|
||||||
- Rule 5.10(m)(1) limiting the number of mound visits.
|
|
||||||
- Rule 5.10(g) requiring that pitchers must face at least three batters.
|
|
||||||
- Rules 5.07(c) specifying time limits on pitchers and batters. Limitations on pitcher disengagements (i.e. pick-offs) shall also not be incorporated.
|
|
||||||
|
|
||||||
|
|
||||||
### Regulation Games
|
|
||||||
Games played under the auspices of both recognized Managers of the participating teams shall count as official. A regulation game is defined as follows
|
|
||||||
|
|
||||||
1. A regulation game consists of seven (7) innings, unless extended because of a tie score, or shortened because the home team needs none of its half of the seventh inning or only a fraction of it, or because the umpire calls the game in accordance with [Reasons for a Game to be Called](#reasons-for-a-game-to-be-called).
|
|
||||||
1. If the score is tied after seven completed innings play shall continue until (1) the visiting team has scored more total runs than the home team at the end of a completed inning, or (2) the home team scores the winning run in an uncompleted inning. If a regulation game is called with the score tied, it shall remain a tie game.
|
|
||||||
1. If a game is called by the umpire, per [Reasons for a Game to be Called](#reasons-for-a-game-to-be-called), it is a regulation (official) game:
|
|
||||||
1. If four innings have been completed;
|
|
||||||
1. If the home team has scored more runs in four or three and a fraction half-innings than the visiting team has scored in four completed half-innings;
|
|
||||||
1. If the home team scores one or more runs in its half of the fourth inning to tie the score.
|
|
||||||
|
|
||||||
Postseason games are exempt from this definition as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
|
||||||
1. Slaughter Rule: The game shall be ended and the leading team declared the winner:
|
|
||||||
1. If after 4 complete innings the visiting team is ahead in the score by 15 or more runs, or if after 3½ innings the home team is ahead by the same, the game will be ended and the leading team declared the winner.
|
|
||||||
1. If after 5 or more complete innings the visiting team is ahead in the score by 12 or more runs, or if after 4½ innings or more the home team is ahead by the same, the game will be ended and the leading team declared the winner.
|
|
||||||
|
|
||||||
The Slaughter Rule is applicable for the playoffs as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
|
||||||
1. If a game is called after 3 complete innings and one team is ahead by 10 or more runs, the game will be ended and the leading team declared the winner.
|
|
||||||
|
|
||||||
Postseason games are exempt from this definition as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
|
||||||
|
|
||||||
1. If a game is postponed or otherwise called before it has become a regulation game, the umpire-in-chief shall declare it “No Game,” meaning the game must be restarted (not resumed) at a later date.
|
|
||||||
|
|
||||||
Postseason games are exempt from this definition as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
|
||||||
|
|
||||||
### Reasons for a Game to be Called
|
|
||||||
An umpire, in their discretion, may declare a game called if
|
|
||||||
|
|
||||||
1. Darkness prevents further safe play.
|
|
||||||
1. Rain, lightning, or other inclement weather precludes safe conditions.
|
|
||||||
1. A new inning would start after 8:15 p.m at a field without lights.
|
|
||||||
1. Local laws or field rules (e.g. lightning detector) prevent continuation of the game.
|
|
||||||
1. Other circumstances prevent further safe play. The Rules and Competition Committee may rule on any forfeit or loss of points as applicable.
|
|
||||||
|
|
||||||
### Game Time
|
|
||||||
The starting time for all weeknight games shall be 5:50 p.m. for fields without lights. Starting times for games played at lighted fields and on the weekends shall be determined by the League and may legally begin after 6:30PM. Forfeit time shall be 20 minutes after the scheduled starting time.
|
|
||||||
|
|
||||||
### Player Uniforms
|
|
||||||
All players must be in proper uniform in order to be eligible to participate in games, as specified in [Uniform](#uniform).
|
|
||||||
|
|
||||||
### Minimum Number of Players
|
|
||||||
Teams must start the game at the scheduled starting time if they have at least eight (8) players present. A team may not wait until forfeit time for players to arrive, the game must begin as soon as a team has 8 players present. If a ninth player does not arrive or arrives after forfeit time, the team shall be in technical forfeit, as defined in [Forfeits](#forfeits).
|
|
||||||
|
|
||||||
1. In the event a team starts a game with eight (8) players, the ninth spot in the batting order shall be considered an out recorded to the pitcher. A team may insert a ninth player in the vacant ninth spot after the start of play.
|
|
||||||
1. A team may begin a game with eight (8) players up to two (2) times in one season. A team that fails to field nine (9) players at the start of the game after receiving 2 (two) prior technical forfeits shall forfeit all subsequent games.
|
|
||||||
1. A team in technical forfeit shall remain in technical forfeit, regardless of the number of players with which it finished the game.
|
|
||||||
A team may finish the game a player short, that is one (1) player less than they started the game with (eight (8) players for a nine (9) man line-up, nine (9) players for a ten (10) man), provided the team does not fall below this minimum.
|
|
||||||
|
|
||||||
1. The vacated spot in the batting order shall be considered an automatic out.
|
|
||||||
1. Should a team fall below the minimum, the game is terminated and the team loses by forfeit.
|
|
||||||
|
|
||||||
### Player Injuries
|
|
||||||
Should a player suffer a debilitating injury during the game and cannot continue, and a team has no more eligible players on its bench, a team can use a player that was removed from the game to replace him. This replacement player must be the first player removed from the game, and if this player is unavailable the next player is used (and so on). If no reserve is present, the vacated spot in the lineup is skipped and all batters move up accordingly, with no penalty to the affected team.
|
|
||||||
|
|
||||||
1. If a substantial case can be made that a team skipped a spot with the intent to gain a competitive advantage, a protest by the opposing team may retroactively be ruled as a forfeit.
|
|
||||||
|
|
||||||
### Equipment
|
|
||||||
|
|
||||||
1. Baseballs: Only Major League regulation balls will be allowed for game play. Accepted brands and ball types include, but are not limited to, the Rawlings RO series, Wilson A1000 series, and Diamond D-1 series. The home team must supply two (2) and the visitors one (1) ball at the start of each game. Additional balls shall be supplied alternately by each team beginning with the visiting team. Teams that supply non-approved balls shall forfeit the game.
|
|
||||||
1. Bats: All bats must be wood or BBCOR certified. Use of an illegal bat shall be subject to the Major League rules that govern this area.
|
|
||||||
1. Bases, home plate, and pitching rubber: All teams are expected to have a set of bases, a home plate, and a pitching rubber. These items shall conform to Major League Baseball specifications. Items conforming to 2022 specifications shall also be considered legal.
|
|
||||||
|
|
||||||
The home team shall be responsible for accurately setting up the bases, and if necessary, home plate and the pitching rubber. Should the home team fail to have these necessities by the start of the game, they will lose by forfeit. The visiting team can lend the equipment, although they are not required to do so.
|
|
||||||
|
|
||||||
### Field Maintenance
|
|
||||||
All teams are responsible for the maintenance and cleanup of the field and dugout areas after a game. Both teams must fill in all infield, batter’s box, and pitching mound holes. Additionally, both teams must have adequate equipment on hand for field maintenance. Teams who repeatedly fail to do proper post-game maintenance shall be fined.
|
|
||||||
|
|
||||||
### Payment of Umpires
|
|
||||||
Umpires are to be paid on the field promptly upon request.
|
|
||||||
|
|
||||||
### Designated Hitter
|
|
||||||
The Association shall follow the Major League designated hitter rule at all times, with the exception that a team may designate a D.H. for any position on the field.
|
|
||||||
|
|
||||||
### Designated Runner
|
|
||||||
The Association shall elect to use a designated runner rule, similar to the designated hitter rule.
|
|
||||||
|
|
||||||
1. A runner may be designated to run for a specified player in any game without otherwise affecting the status of the player(s) in the game.
|
|
||||||
1. The designated runner must take the place of the specified player whenever that player reaches base or the designated runner.
|
|
||||||
1. If the specified player is substituted, this substitute player may inherit the designated runner.
|
|
||||||
1. Designated runners are subject to the same substitution rules as the designated hitter as defined in [Designated Hitter](#designated-hitter)
|
|
||||||
1. Teams with no eligible players remaining on the bench (i.e. all players are in the batting lineup) may elect to use the player that made the last out as the designated runner.
|
|
||||||
|
|
||||||
### Extra Hitter
|
|
||||||
Prior to the start of the game a team may choose to play an extra hitter (EH). If the team uses this option, the following conditions apply:
|
|
||||||
|
|
||||||
1. An EH shall only bat. They cannot take a position in the field as a tenth fielder.
|
|
||||||
1. The EH shall be treated like any other position in the field. He can be substituted for, switch positions, or anything else that a position player can do.
|
|
||||||
1. There is no limit to the number of extra hitters a team may elect to use, provided the names and numbers of these players are included in the lineup exchanged before the game.
|
|
||||||
|
|
||||||
### Courtesy Runner
|
|
||||||
Teams may use courtesy runners for pitchers and catchers at any time. It is not mandatory to do so (speed-up rule), but the umpire(s) are required to keep the game moving expeditiously.
|
|
||||||
|
|
||||||
1. Courtesy runners for pitchers and catchers cannot be, or have been, in the game at any time other than as a courtesy runner. Teams with no eligible players remaining on the bench must use the first player taken out of the game or the player that made the last out.
|
|
||||||
1. The pitcher or catcher must play at least one (1) defensive out to be eligible for a courtesy runner unless they reach base in the first inning as a member of the visiting team.
|
|
||||||
|
|
||||||
### Batting Lineup
|
|
||||||
The batting lineup shall consist of at minimum 9 slots (or 8 adhering to section [Minimum Number of Players](#minimum-number-of-players)). Additional slots may be used without limit (see [Extra Hitter](#extra-hitter)). Any player may be substituted in their batting lineup slot by using a pinch-hitter or pinch-runner for that player. The original player may not re-enter the game as a hitter.
|
|
||||||
|
|
||||||
### A/B Batting Lineup Slots
|
|
||||||
In regular season play, any batting lineup slot may be optionally designated as an "A/B" batting slot, meaning it is shared between two players adhering to the following rules:
|
|
||||||
|
|
||||||
1. The batter designated "A" shall bat the first time through the lineup and the batter designated "B" batting the second time through the lineup, continuing in alternating fashion for the remainder of the game.
|
|
||||||
2. Rules for the substitutions of either "A" or "B" batter are the same as any other batting lineup slot.
|
|
||||||
3. In the event of injury of either player when there are no reserve players available, the uninjured player shall bat in place of the injured player without penalty.
|
|
||||||
|
|
||||||
In postseason play, the A/B batting slot rule defined above shall not be applicable.
|
|
||||||
|
|
||||||
### Defensive Lineup
|
|
||||||
In regular season play, the defensive line-up is independent of the batting lineup and substitutions shall be allowed as follows:
|
|
||||||
|
|
||||||
1. Any player may be freely substituted in the defensive line-up at any time, without affecting the players’ in the batting line-up. Players may enter, exit, and re-enter the game in the defensive line-up without limitation.
|
|
||||||
|
|
||||||
In postseason play, the free defensive substitution rule defined above shall not be applicable and substitutions shall be made in accordance to applicable CMBA and MLB rules.
|
|
||||||
|
|
||||||
### Field Status
|
|
||||||
The home team shall be responsible for checking the status of the field in the event of rain. The home team must report the status of the field to the President and the assigned umpire no later than 2:00 pm for a weeknight game, and at least 2 hrs. before a weekend game. As a courtesy, the home team should also notify the visiting manager, but the visiting manager may also contact the President for information regarding the status of the field.
|
|
||||||
|
|
||||||
1. Any manager who knowingly falsifies information regarding the status of the field to avoid playing the game will be fined and the team will forfeit the game.
|
|
||||||
|
|
||||||
### Rescheduling
|
|
||||||
In the discretion of the president, a game may be postponed due to extraordinary circumstances. In the event a game is to be postponed, the president shall alert the managers in an expedient manner.
|
|
||||||
Managers from both teams must contact the President to confirm any changes that they wish to make to the official schedule. Teams may not change times, places, or dates of games without the consent of the President. Any such games played shall be considered unofficial.
|
|
||||||
Any postponed or suspended games must be rescheduled in a timely fashion by the managers of that game for the next possible date. If managers cannot come to an agreement in a timely fashion, the President may reschedule the game.
|
|
||||||
|
|
||||||
### Notification of Results
|
|
||||||
The winning team shall be responsible for notifying the President of the score of the game no later than 10:00 AM the day after the game was played via text message, email, or telephone call.
|
|
||||||
|
|
||||||
### Uncompleted Games
|
|
||||||
All games not completed by the end of the regular season shall count as losses for both teams unless a team deliberately attempts to avoid playing a sanctioned game. The team that was willing to play the game will be judged the forfeit winner if so ruled by the President.
|
|
||||||
|
|
||||||
### Substitution of an Umpire
|
|
||||||
Should a league sanctioned umpire fail to appear at game time, the teams can choose to play the game with an umpire(s) of mutual choosing. The President needs to be informed by both teams prior to the start of the game to make it official.
|
|
||||||
|
|
||||||
### Collisions
|
|
||||||
NO COLLISIONS ARE ALLOWED, UNLESS THE CONTACT RESULTS FROM A SLIDE. It is the base runners responsibility to slide or avoid contact. Fielders and runners must abide by Official Baseball Rules regarding Interference, Obstruction, and Catcher Collisions..
|
|
||||||
Unless the umpire rules that the contact was incidental or the result of Obstruction by the fielder, the runner shall be called out, the ball declared dead and the runner automatically ejected from the game. Per [Flagrant Collisions](#flagrant-collisions). if the collision is determined by the umpire to be flagrant the player may be subject to the further penalty as defined in that section.
|
|
||||||
|
|
||||||
### Umpire Disputes
|
|
||||||
Discussion of a disputed umpires call shall be limited to the managers, base coaches and the “aggrieved player. No player or other coach (third party) shall be allowed to leave the dugout or his defensive position to join in. The penalty for violating this rule shall be the immediate ejection from the game.
|
|
||||||
|
|
||||||
## Protest and Forfeits
|
## Protest and Forfeits
|
||||||
|
|
||||||
### Timeframe and Reporting
|
### Timeframe and Reporting
|
||||||
154
docs/03-playing-rules.md
Normal file
154
docs/03-playing-rules.md
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
# Playing Rules
|
||||||
|
|
||||||
|
## Playing Rules
|
||||||
|
Except where specified in this document, the CMBA shall follow the Official Baseball Rules of Major League Baseball.
|
||||||
|
|
||||||
|
The CMBA shall not incorporate the following rules of Major League Baseball:
|
||||||
|
|
||||||
|
- Rule 4.03(c)(4) specifying limitations on when a position player can pitch.
|
||||||
|
- Rule 5.02(c) specifying limitations on infielder placement.
|
||||||
|
- Rule 7.01(b) incorporating the parameters of the Extra Innings Rule, which includes starting each half-inning following the last regulation inning with a runner on second base.
|
||||||
|
- Rule 5.10(m)(1) limiting the number of mound visits.
|
||||||
|
- Rule 5.10(g) requiring that pitchers must face at least three batters.
|
||||||
|
- Rules 5.07(c) specifying time limits on pitchers and batters. Limitations on pitcher disengagements (i.e. pick-offs) shall also not be incorporated.
|
||||||
|
|
||||||
|
|
||||||
|
## Regulation Games
|
||||||
|
Games played under the auspices of both recognized Managers of the participating teams shall count as official. A regulation game is defined as follows
|
||||||
|
|
||||||
|
1. A regulation game consists of seven (7) innings, unless extended because of a tie score, or shortened because the home team needs none of its half of the seventh inning or only a fraction of it, or because the umpire calls the game in accordance with [Reasons for a Game to be Called](#reasons-for-a-game-to-be-called).
|
||||||
|
1. If the score is tied after seven completed innings play shall continue until (1) the visiting team has scored more total runs than the home team at the end of a completed inning, or (2) the home team scores the winning run in an uncompleted inning. If a regulation game is called with the score tied, it shall remain a tie game.
|
||||||
|
1. If a game is called by the umpire, per [Reasons for a Game to be Called](#reasons-for-a-game-to-be-called), it is a regulation (official) game:
|
||||||
|
1. If four innings have been completed;
|
||||||
|
1. If the home team has scored more runs in four or three and a fraction half-innings than the visiting team has scored in four completed half-innings;
|
||||||
|
1. If the home team scores one or more runs in its half of the fourth inning to tie the score.
|
||||||
|
|
||||||
|
Postseason games are exempt from this definition as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
||||||
|
1. Slaughter Rule: The game shall be ended and the leading team declared the winner:
|
||||||
|
1. If after 4 complete innings the visiting team is ahead in the score by 15 or more runs, or if after 3½ innings the home team is ahead by the same, the game will be ended and the leading team declared the winner.
|
||||||
|
1. If after 5 or more complete innings the visiting team is ahead in the score by 12 or more runs, or if after 4½ innings or more the home team is ahead by the same, the game will be ended and the leading team declared the winner.
|
||||||
|
|
||||||
|
The Slaughter Rule is applicable for the playoffs as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
||||||
|
1. If a game is called after 3 complete innings and one team is ahead by 10 or more runs, the game will be ended and the leading team declared the winner.
|
||||||
|
|
||||||
|
Postseason games are exempt from this definition as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
||||||
|
|
||||||
|
1. If a game is postponed or otherwise called before it has become a regulation game, the umpire-in-chief shall declare it “No Game,” meaning the game must be restarted (not resumed) at a later date.
|
||||||
|
|
||||||
|
Postseason games are exempt from this definition as specified in [Completion of Playoff Games](#completion-of-playoff-games).
|
||||||
|
|
||||||
|
## Reasons for a Game to be Called
|
||||||
|
An umpire, in their discretion, may declare a game called if
|
||||||
|
|
||||||
|
1. Darkness prevents further safe play.
|
||||||
|
1. Rain, lightning, or other inclement weather precludes safe conditions.
|
||||||
|
1. A new inning would start after 8:15 p.m at a field without lights.
|
||||||
|
1. Local laws or field rules (e.g. lightning detector) prevent continuation of the game.
|
||||||
|
1. Other circumstances prevent further safe play. The Rules and Competition Committee may rule on any forfeit or loss of points as applicable.
|
||||||
|
|
||||||
|
## Game Time
|
||||||
|
The starting time for all weeknight games shall be 5:50 p.m. for fields without lights. Starting times for games played at lighted fields and on the weekends shall be determined by the League and may legally begin after 6:30PM. Forfeit time shall be 20 minutes after the scheduled starting time.
|
||||||
|
|
||||||
|
## Player Uniforms
|
||||||
|
All players must be in proper uniform in order to be eligible to participate in games, as specified in [Uniform](#uniform).
|
||||||
|
|
||||||
|
## Minimum Number of Players
|
||||||
|
Teams must start the game at the scheduled starting time if they have at least eight (8) players present. A team may not wait until forfeit time for players to arrive, the game must begin as soon as a team has 8 players present. If a ninth player does not arrive or arrives after forfeit time, the team shall be in technical forfeit, as defined in [Forfeits](#forfeits).
|
||||||
|
|
||||||
|
1. In the event a team starts a game with eight (8) players, the ninth spot in the batting order shall be considered an out recorded to the pitcher. A team may insert a ninth player in the vacant ninth spot after the start of play.
|
||||||
|
1. A team may begin a game with eight (8) players up to two (2) times in one season. A team that fails to field nine (9) players at the start of the game after receiving 2 (two) prior technical forfeits shall forfeit all subsequent games.
|
||||||
|
1. A team in technical forfeit shall remain in technical forfeit, regardless of the number of players with which it finished the game.
|
||||||
|
A team may finish the game a player short, that is one (1) player less than they started the game with (eight (8) players for a nine (9) man line-up, nine (9) players for a ten (10) man), provided the team does not fall below this minimum.
|
||||||
|
|
||||||
|
1. The vacated spot in the batting order shall be considered an automatic out.
|
||||||
|
1. Should a team fall below the minimum, the game is terminated and the team loses by forfeit.
|
||||||
|
|
||||||
|
## Player Injuries
|
||||||
|
Should a player suffer a debilitating injury during the game and cannot continue, and a team has no more eligible players on its bench, a team can use a player that was removed from the game to replace him. This replacement player must be the first player removed from the game, and if this player is unavailable the next player is used (and so on). If no reserve is present, the vacated spot in the lineup is skipped and all batters move up accordingly, with no penalty to the affected team.
|
||||||
|
|
||||||
|
1. If a substantial case can be made that a team skipped a spot with the intent to gain a competitive advantage, a protest by the opposing team may retroactively be ruled as a forfeit.
|
||||||
|
|
||||||
|
## Equipment
|
||||||
|
|
||||||
|
1. Baseballs: Only Major League regulation balls will be allowed for game play. Accepted brands and ball types include, but are not limited to, the Rawlings RO series, Wilson A1000 series, and Diamond D-1 series. The home team must supply two (2) and the visitors one (1) ball at the start of each game. Additional balls shall be supplied alternately by each team beginning with the visiting team. Teams that supply non-approved balls shall forfeit the game.
|
||||||
|
1. Bats: All bats must be wood or BBCOR certified. Use of an illegal bat shall be subject to the Major League rules that govern this area.
|
||||||
|
1. Bases, home plate, and pitching rubber: All teams are expected to have a set of bases, a home plate, and a pitching rubber. These items shall conform to Major League Baseball specifications. Items conforming to 2022 specifications shall also be considered legal.
|
||||||
|
|
||||||
|
The home team shall be responsible for accurately setting up the bases, and if necessary, home plate and the pitching rubber. Should the home team fail to have these necessities by the start of the game, they will lose by forfeit. The visiting team can lend the equipment, although they are not required to do so.
|
||||||
|
|
||||||
|
## Field Maintenance
|
||||||
|
All teams are responsible for the maintenance and cleanup of the field and dugout areas after a game. Both teams must fill in all infield, batter’s box, and pitching mound holes. Additionally, both teams must have adequate equipment on hand for field maintenance. Teams who repeatedly fail to do proper post-game maintenance shall be fined.
|
||||||
|
|
||||||
|
## Payment of Umpires
|
||||||
|
Umpires are to be paid on the field promptly upon request.
|
||||||
|
|
||||||
|
## Designated Hitter
|
||||||
|
The Association shall follow the Major League designated hitter rule at all times, with the exception that a team may designate a D.H. for any position on the field.
|
||||||
|
|
||||||
|
## Designated Runner
|
||||||
|
The Association shall elect to use a designated runner rule, similar to the designated hitter rule.
|
||||||
|
|
||||||
|
1. A runner may be designated to run for a specified player in any game without otherwise affecting the status of the player(s) in the game.
|
||||||
|
1. The designated runner must take the place of the specified player whenever that player reaches base or the designated runner.
|
||||||
|
1. If the specified player is substituted, this substitute player may inherit the designated runner.
|
||||||
|
1. Designated runners are subject to the same substitution rules as the designated hitter as defined in [Designated Hitter](#designated-hitter)
|
||||||
|
1. Teams with no eligible players remaining on the bench (i.e. all players are in the batting lineup) may elect to use the player that made the last out as the designated runner.
|
||||||
|
|
||||||
|
## Extra Hitter
|
||||||
|
Prior to the start of the game a team may choose to play an extra hitter (EH). If the team uses this option, the following conditions apply:
|
||||||
|
|
||||||
|
1. An EH shall only bat. They cannot take a position in the field as a tenth fielder.
|
||||||
|
1. The EH shall be treated like any other position in the field. He can be substituted for, switch positions, or anything else that a position player can do.
|
||||||
|
1. There is no limit to the number of extra hitters a team may elect to use, provided the names and numbers of these players are included in the lineup exchanged before the game.
|
||||||
|
|
||||||
|
## Courtesy Runner
|
||||||
|
Teams may use courtesy runners for pitchers and catchers at any time. It is not mandatory to do so (speed-up rule), but the umpire(s) are required to keep the game moving expeditiously.
|
||||||
|
|
||||||
|
1. Courtesy runners for pitchers and catchers cannot be, or have been, in the game at any time other than as a courtesy runner. Teams with no eligible players remaining on the bench must use the first player taken out of the game or the player that made the last out.
|
||||||
|
1. The pitcher or catcher must play at least one (1) defensive out to be eligible for a courtesy runner unless they reach base in the first inning as a member of the visiting team.
|
||||||
|
|
||||||
|
## Batting Lineup
|
||||||
|
The batting lineup shall consist of at minimum 9 slots (or 8 adhering to section [Minimum Number of Players](#minimum-number-of-players)). Additional slots may be used without limit (see [Extra Hitter](#extra-hitter)). Any player may be substituted in their batting lineup slot by using a pinch-hitter or pinch-runner for that player. The original player may not re-enter the game as a hitter.
|
||||||
|
|
||||||
|
## A/B Batting Lineup Slots
|
||||||
|
In regular season play, any batting lineup slot may be optionally designated as an "A/B" batting slot, meaning it is shared between two players adhering to the following rules:
|
||||||
|
|
||||||
|
1. The batter designated "A" shall bat the first time through the lineup and the batter designated "B" batting the second time through the lineup, continuing in alternating fashion for the remainder of the game.
|
||||||
|
2. Rules for the substitutions of either "A" or "B" batter are the same as any other batting lineup slot.
|
||||||
|
3. In the event of injury of either player when there are no reserve players available, the uninjured player shall bat in place of the injured player without penalty.
|
||||||
|
|
||||||
|
In postseason play, the A/B batting slot rule defined above shall not be applicable.
|
||||||
|
|
||||||
|
## Defensive Lineup
|
||||||
|
In regular season play, the defensive line-up is independent of the batting lineup and substitutions shall be allowed as follows:
|
||||||
|
|
||||||
|
1. Any player may be freely substituted in the defensive line-up at any time, without affecting the players’ in the batting line-up. Players may enter, exit, and re-enter the game in the defensive line-up without limitation.
|
||||||
|
|
||||||
|
In postseason play, the free defensive substitution rule defined above shall not be applicable and substitutions shall be made in accordance to applicable CMBA and MLB rules.
|
||||||
|
|
||||||
|
## Field Status
|
||||||
|
The home team shall be responsible for checking the status of the field in the event of rain. The home team must report the status of the field to the President and the assigned umpire no later than 2:00 pm for a weeknight game, and at least 2 hrs. before a weekend game. As a courtesy, the home team should also notify the visiting manager, but the visiting manager may also contact the President for information regarding the status of the field.
|
||||||
|
|
||||||
|
1. Any manager who knowingly falsifies information regarding the status of the field to avoid playing the game will be fined and the team will forfeit the game.
|
||||||
|
|
||||||
|
## Rescheduling
|
||||||
|
In the discretion of the president, a game may be postponed due to extraordinary circumstances. In the event a game is to be postponed, the president shall alert the managers in an expedient manner.
|
||||||
|
Managers from both teams must contact the President to confirm any changes that they wish to make to the official schedule. Teams may not change times, places, or dates of games without the consent of the President. Any such games played shall be considered unofficial.
|
||||||
|
Any postponed or suspended games must be rescheduled in a timely fashion by the managers of that game for the next possible date. If managers cannot come to an agreement in a timely fashion, the President may reschedule the game.
|
||||||
|
|
||||||
|
## Notification of Results
|
||||||
|
The winning team shall be responsible for notifying the President of the score of the game no later than 10:00 AM the day after the game was played via text message, email, or telephone call.
|
||||||
|
|
||||||
|
## Uncompleted Games
|
||||||
|
All games not completed by the end of the regular season shall count as losses for both teams unless a team deliberately attempts to avoid playing a sanctioned game. The team that was willing to play the game will be judged the forfeit winner if so ruled by the President.
|
||||||
|
|
||||||
|
## Substitution of an Umpire
|
||||||
|
Should a league sanctioned umpire fail to appear at game time, the teams can choose to play the game with an umpire(s) of mutual choosing. The President needs to be informed by both teams prior to the start of the game to make it official.
|
||||||
|
|
||||||
|
## Collisions
|
||||||
|
NO COLLISIONS ARE ALLOWED, UNLESS THE CONTACT RESULTS FROM A SLIDE. It is the base runners responsibility to slide or avoid contact. Fielders and runners must abide by Official Baseball Rules regarding Interference, Obstruction, and Catcher Collisions..
|
||||||
|
Unless the umpire rules that the contact was incidental or the result of Obstruction by the fielder, the runner shall be called out, the ball declared dead and the runner automatically ejected from the game. Per [Flagrant Collisions](#flagrant-collisions). if the collision is determined by the umpire to be flagrant the player may be subject to the further penalty as defined in that section.
|
||||||
|
|
||||||
|
## Umpire Disputes
|
||||||
|
Discussion of a disputed umpires call shall be limited to the managers, base coaches and the “aggrieved player. No player or other coach (third party) shall be allowed to leave the dugout or his defensive position to join in. The penalty for violating this rule shall be the immediate ejection from the game.
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 199 KiB |
3
docs/index.md
Normal file
3
docs/index.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# CMBA Constitution and By-Laws
|
||||||
|
|
||||||
|
2024-06-06
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# CMBA Rulebooks
|
|
||||||
|
|
||||||
Use the navigation to view the documents.
|
|
||||||
@@ -1,26 +1,13 @@
|
|||||||
site_name: CMBA Rulebook
|
site_name: CMBA Constitution and By-Laws
|
||||||
docs_dir: ..
|
docs_dir: ../docs
|
||||||
site_dir: ./dist
|
|
||||||
|
|
||||||
# Prevent accidental publishing of repo/CI/dev clutter
|
# Prevent accidental publishing of repo/CI/dev clutter
|
||||||
exclude_docs: |
|
|
||||||
.github/
|
|
||||||
.git/
|
|
||||||
.venv/
|
|
||||||
venv/
|
|
||||||
"*.sh"
|
|
||||||
"*.py"
|
|
||||||
"*.yml"
|
|
||||||
"*.yaml"
|
|
||||||
"README.md"
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
palette:
|
palette:
|
||||||
scheme: default
|
scheme: default
|
||||||
primary: blue
|
primary: blue
|
||||||
accent: red
|
accent: red
|
||||||
logo: ../assets/cmba-logo.svg
|
|
||||||
favicon: ../assets/favicon.png
|
|
||||||
features:
|
features:
|
||||||
- navigation.instant
|
- navigation.instant
|
||||||
- navigation.tracking
|
- navigation.tracking
|
||||||
@@ -28,21 +15,29 @@ theme:
|
|||||||
- toc.integrate
|
- toc.integrate
|
||||||
- search.highlight
|
- search.highlight
|
||||||
- search.suggest
|
- search.suggest
|
||||||
|
logo: assets/cmba-logo.svg
|
||||||
|
favicon: assets/cmba-favicon.png
|
||||||
extra_css:
|
extra_css:
|
||||||
- mkdocs/styles/extra.css
|
- styles/extra.css
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- toc:
|
- toc:
|
||||||
permalink: true
|
permalink: true
|
||||||
- admonition:
|
- admonition:
|
||||||
# - tables
|
# - tables
|
||||||
nav:
|
nav:
|
||||||
- Home: mkdocs/index.md
|
- Home: index.md
|
||||||
- Constitution: cmba-constitution.md
|
- 01-consitution.md
|
||||||
- Bylaws: cmba-bylaws.md
|
- 02-bylaws.md
|
||||||
|
- 03-playing-rules.md
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- search
|
- search
|
||||||
|
- offline
|
||||||
- enumerate-headings:
|
- enumerate-headings:
|
||||||
toc_depth: 2
|
toc_depth: 2
|
||||||
exclude:
|
exclude:
|
||||||
- mkdocs/index.md
|
- index.md
|
||||||
|
|
||||||
|
validation:
|
||||||
|
links:
|
||||||
|
anchors: warn #this defaults to info, but it will cause broken links in anchor headers
|
||||||
309
styles/style.css
309
styles/style.css
@@ -1,309 +0,0 @@
|
|||||||
/* CMBA Rulebook CSS for Pandoc HTML
|
|
||||||
Compatible with Pandoc's default HTML structure:
|
|
||||||
- header#title-block-header
|
|
||||||
- nav#TOC[role="doc-toc"]
|
|
||||||
- headings with ids/classes like .unnumbered
|
|
||||||
*/
|
|
||||||
|
|
||||||
@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&display=swap");
|
|
||||||
|
|
||||||
:root{
|
|
||||||
--bg: #ffffff;
|
|
||||||
--fg: #111827; /* slate-900 */
|
|
||||||
--muted: #6b7280; /* gray-500 */
|
|
||||||
--border: #e5e7eb; /* gray-200 */
|
|
||||||
--card: #f9fafb; /* gray-50 */
|
|
||||||
--link: #1d4ed8; /* blue-700 */
|
|
||||||
--link-hover: #1e40af; /* blue-800 */
|
|
||||||
--code-bg: #0b1020; /* dark */
|
|
||||||
--code-fg: #e5e7eb;
|
|
||||||
|
|
||||||
--radius: 12px;
|
|
||||||
--content-max: 980px;
|
|
||||||
--toc-max: 320px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Base */
|
|
||||||
html { scroll-behavior: smooth; }
|
|
||||||
body{
|
|
||||||
margin: 0;
|
|
||||||
background: var(--bg);
|
|
||||||
color: var(--fg);
|
|
||||||
|
|
||||||
/* Rulebook serif stack */
|
|
||||||
font-family:
|
|
||||||
"Merriweather",
|
|
||||||
"Georgia",
|
|
||||||
"Times New Roman",
|
|
||||||
Times,
|
|
||||||
"Liberation Serif",
|
|
||||||
serif;
|
|
||||||
|
|
||||||
line-height: 1.6;
|
|
||||||
font-size: 16px;
|
|
||||||
text-rendering: optimizeLegibility;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Layout: single column on mobile, TOC sidebar on wide screens */
|
|
||||||
body{
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Give anchored headings a little offset for mobile browser bars */
|
|
||||||
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]{
|
|
||||||
scroll-margin-top: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Main document container: Pandoc outputs direct children; we style them */
|
|
||||||
header#title-block-header,
|
|
||||||
nav#TOC,
|
|
||||||
main,
|
|
||||||
body > h1, body > h2, body > h3, body > h4, body > h5, body > h6,
|
|
||||||
body > p, body > ul, body > ol, body > table, body > blockquote, body > pre, body > hr,
|
|
||||||
body > dl{
|
|
||||||
max-width: var(--content-max);
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Title block */
|
|
||||||
header#title-block-header{
|
|
||||||
padding: 20px 16px 8px;
|
|
||||||
border-bottom: 1px solid var(--border);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
header#title-block-header .title{
|
|
||||||
margin: 0 0 6px;
|
|
||||||
font-size: 1.75rem;
|
|
||||||
line-height: 1.2;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
}
|
|
||||||
header#title-block-header .subtitle{
|
|
||||||
margin: 0 0 8px;
|
|
||||||
color: var(--muted);
|
|
||||||
}
|
|
||||||
header#title-block-header .author,
|
|
||||||
header#title-block-header .date{
|
|
||||||
margin: 0;
|
|
||||||
color: var(--muted);
|
|
||||||
font-size: 0.95rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TOC card */
|
|
||||||
nav#TOC{
|
|
||||||
padding: 0 16px 12px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
nav#TOC > ul{
|
|
||||||
margin: 0;
|
|
||||||
padding: 14px 16px;
|
|
||||||
background: var(--card);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
}
|
|
||||||
nav#TOC ul{
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
nav#TOC li{
|
|
||||||
margin: 6px 0;
|
|
||||||
}
|
|
||||||
nav#TOC a{
|
|
||||||
color: var(--link);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
nav#TOC a:hover{
|
|
||||||
color: var(--link-hover);
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
nav#TOC ul ul{
|
|
||||||
margin-top: 6px;
|
|
||||||
padding-left: 14px;
|
|
||||||
border-left: 2px solid var(--border);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Content padding */
|
|
||||||
body > *{
|
|
||||||
padding-left: 16px;
|
|
||||||
padding-right: 16px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Headings */
|
|
||||||
h1, h2, h3, h4, h5, h6{
|
|
||||||
line-height: 1.25;
|
|
||||||
margin: 22px auto 10px;
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
}
|
|
||||||
h1{ font-size: 1.55rem; }
|
|
||||||
h2{ font-size: 1.25rem; }
|
|
||||||
h3{ font-size: 1.1rem; }
|
|
||||||
h4{ font-size: 1.0rem; }
|
|
||||||
h5{ font-size: 0.95rem; }
|
|
||||||
h6{ font-size: 0.9rem; color: var(--muted); }
|
|
||||||
|
|
||||||
/* Unnumbered headings (Pandoc uses .unnumbered sometimes) */
|
|
||||||
.unnumbered{
|
|
||||||
scroll-margin-top: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Paragraphs and lists */
|
|
||||||
p{
|
|
||||||
margin: 0 auto 12px;
|
|
||||||
}
|
|
||||||
ul, ol{
|
|
||||||
margin: 0 auto 14px;
|
|
||||||
padding-left: 1.25rem;
|
|
||||||
}
|
|
||||||
li{
|
|
||||||
margin: 6px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Links */
|
|
||||||
a{
|
|
||||||
color: var(--link);
|
|
||||||
text-decoration-thickness: 2px;
|
|
||||||
text-underline-offset: 3px;
|
|
||||||
}
|
|
||||||
a:hover{
|
|
||||||
color: var(--link-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Blockquotes */
|
|
||||||
blockquote{
|
|
||||||
margin: 14px auto;
|
|
||||||
padding: 10px 14px;
|
|
||||||
border-left: 4px solid var(--border);
|
|
||||||
background: var(--card);
|
|
||||||
border-radius: 10px;
|
|
||||||
color: #111827;
|
|
||||||
}
|
|
||||||
blockquote p{ margin: 0; }
|
|
||||||
|
|
||||||
/* Horizontal rule */
|
|
||||||
hr{
|
|
||||||
border: 0;
|
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
margin: 18px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tables */
|
|
||||||
table{
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
margin: 14px auto 18px;
|
|
||||||
overflow: hidden;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
display: block; /* enables horizontal scroll on small screens */
|
|
||||||
}
|
|
||||||
thead th{
|
|
||||||
background: var(--card);
|
|
||||||
text-align: left;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
th, td{
|
|
||||||
padding: 10px 12px;
|
|
||||||
border-bottom: 1px solid var(--border);
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
tbody tr:last-child td{ border-bottom: 0; }
|
|
||||||
|
|
||||||
/* Code */
|
|
||||||
code{
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
||||||
font-size: 0.95em;
|
|
||||||
background: #f3f4f6;
|
|
||||||
padding: 0.12em 0.32em;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
pre{
|
|
||||||
margin: 14px auto 18px;
|
|
||||||
padding: 12px 14px;
|
|
||||||
background: var(--code-bg);
|
|
||||||
color: var(--code-fg);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
overflow: auto;
|
|
||||||
border: 1px solid rgba(255,255,255,0.08);
|
|
||||||
}
|
|
||||||
pre code{
|
|
||||||
background: transparent;
|
|
||||||
color: inherit;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.quote-icon {
|
|
||||||
display: inline-block;
|
|
||||||
width: 0.9em;
|
|
||||||
height: 0.9em;
|
|
||||||
vertical-align: middle;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
background-image: url("data:image/svg+xml;utf8,\
|
|
||||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'>\
|
|
||||||
<path fill='currentColor' d='M96 224c0-35.3 28.7-64 64-64h32V64H160C71.6 64 0 135.6 0 224v64c0 70.7 57.3 128 128 128h32V288h-32c-17.7 0-32-14.3-32-32v-32zm256 0c0-35.3 28.7-64 64-64h32V64h-32c-88.4 0-160 71.6-160 160v64c0 70.7 57.3 128 128 128h32V288h-32c-17.7 0-32-14.3-32-32v-32z'/>\
|
|
||||||
</svg>");
|
|
||||||
}
|
|
||||||
.quote-btn {
|
|
||||||
margin-left:.5rem;
|
|
||||||
font-size:.8em;
|
|
||||||
vertical-align:middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Small-screen polish */
|
|
||||||
@media (max-width: 520px){
|
|
||||||
header#title-block-header .title{ font-size: 1.45rem; }
|
|
||||||
body{ font-size: 16px; }
|
|
||||||
nav#TOC > ul{ padding: 12px 14px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wide-screen layout: TOC sidebar + content */
|
|
||||||
@media (min-width: 1080px){
|
|
||||||
body{
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: minmax(260px, var(--toc-max)) minmax(0, 1fr);
|
|
||||||
gap: 18px;
|
|
||||||
align-items: start;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove the auto max-width behavior inside grid; we manage widths here */
|
|
||||||
header#title-block-header,
|
|
||||||
nav#TOC,
|
|
||||||
body > h1, body > h2, body > h3, body > h4, body > h5, body > h6,
|
|
||||||
body > p, body > ul, body > ol, body > table, body > blockquote, body > pre, body > hr,
|
|
||||||
body > dl{
|
|
||||||
max-width: none;
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header#title-block-header{
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
padding: 16px 18px 10px;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
background: var(--bg);
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav#TOC{
|
|
||||||
grid-column: 1;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
position: sticky;
|
|
||||||
top: 18px;
|
|
||||||
max-height: calc(100vh - 36px);
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
nav#TOC > ul{
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Treat the rest of the content as column 2 */
|
|
||||||
body > :not(header#title-block-header):not(nav#TOC){
|
|
||||||
grid-column: 2;
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
max-width: var(--content-max);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
15
tools/build.sh
Executable file
15
tools/build.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
||||||
|
TMPDIR="${RUNNER_TEMP:-$TMPDIR}"
|
||||||
|
OUTPUT_DIR="${OUTPUT_DIR:-${TMPDIR}/dist/}"
|
||||||
|
# OFFLINE="${OFFLINE:-false}" # This doesn't seem to do anything, set by mkdocs.yml
|
||||||
|
MKDOCS_CONFIG="${MKDOCS_CONFIG:-mkdocs/mkdocs.yml}"
|
||||||
|
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user