Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
76964d837c
|
|||
|
0b4fadf18d
|
|||
|
694c423772
|
|||
|
3669173cb6
|
|||
|
47a3a32632
|
|||
|
70eace7afb
|
|||
|
43d7b10551
|
|||
|
dcbe64b222
|
|||
|
85856af1fd
|
|||
|
04285c9817
|
|||
|
82098131aa
|
|||
|
d5a2d95ed6
|
|||
|
89fd2860ae
|
|||
|
1bd64f7a99
|
|||
|
5c08d16be3
|
|||
|
2cd58ee332
|
|||
|
e8ea6bccb6
|
|||
|
3bfe28a61e
|
|||
|
4ae1d6898f
|
|||
|
0c8c37907d
|
|||
|
f92d67775b
|
|||
|
5e8ef75063
|
|||
|
d670a6b450
|
|||
|
d5669178db
|
|||
|
44d0a66aa5
|
|||
|
f59d056cf4
|
|||
|
eaf916443c
|
76
.github/workflows/deploy-rc-pages.yml
vendored
76
.github/workflows/deploy-rc-pages.yml
vendored
@@ -1,76 +0,0 @@
|
|||||||
name: Deploy RC preview to GitHub Pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags: ["rc*"]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-rc-pages:
|
|
||||||
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: Build site (strict default)
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
export MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
|
|
||||||
export TMPDIR="${RUNNER_TEMP:-$TMPDIR}"
|
|
||||||
export OUTPUT_DIR="${OUTPUT_DIR:-${TMPDIR}/dist/}"
|
|
||||||
tools/build.sh --config mkdocs/mkdocs.yml
|
|
||||||
|
|
||||||
- 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: |
|
|
||||||
export TMPDIR="${RUNNER_TEMP:-$TMPDIR}"
|
|
||||||
export OUTPUT_DIR="${OUTPUT_DIR:-${TMPDIR}/dist/}"
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
rm -rf "rc"* || true
|
|
||||||
mkdir -p "rc/"
|
|
||||||
cp -a "$OUTPUT_DIR/." "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
|
|
||||||
- name: Publish prerelease (GitHub)
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
prerelease: true
|
|
||||||
body: |
|
|
||||||
RC preview: https://<org>.github.io/<repo>/rc/
|
|
||||||
|
|
||||||
Tag: ${{ github.ref_name }}
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
100
.github/workflows/release.yml
vendored
100
.github/workflows/release.yml
vendored
@@ -8,22 +8,24 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MKDOCS_CONFIG: mkdocs/mkdocs.yml
|
MKDOCS_CONFIG: mkdocs/mkdocs.yml
|
||||||
MKDOCS_OUTPUT_DIR: ${{ runner.temp }}/dist
|
|
||||||
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout (tag)
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
|
|
||||||
@@ -32,7 +34,7 @@ jobs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
pip install -r mkdocs/requirements.txt
|
pip install -r mkdocs/requirements.txt
|
||||||
|
|
||||||
- name: Build docs (strict gate)
|
- name: Build docs (normal + offline, strict gate)
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
@@ -41,30 +43,23 @@ jobs:
|
|||||||
FLAGS+=(--strict)
|
FLAGS+=(--strict)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${MKDOCS_OUTPUT_DIR}"
|
OUT_BASE="${RUNNER_TEMP}/mkdocs_out"
|
||||||
|
SITE="${OUT_BASE}/site"
|
||||||
|
SITE_OFFLINE="${OUT_BASE}/site_offline/${GITHUB_REF_NAME}"
|
||||||
|
|
||||||
OFFLINE="${OFFLINE:-true}" mkdocs build \
|
rm -rf "${OUT_BASE}"
|
||||||
"${FLAGS[@]}" \
|
mkdir -p "${SITE}" "${SITE_OFFLINE}"
|
||||||
-f "${MKDOCS_CONFIG}" \
|
|
||||||
-d "${MKDOCS_OUTPUT_DIR}/offline"
|
|
||||||
mkdocs build \
|
|
||||||
"${FLAGS[@]}" \
|
|
||||||
-f "${MKDOCS_CONFIG}" \
|
|
||||||
-d "${MKDOCS_OUTPUT_DIR}/dist"
|
|
||||||
|
|
||||||
- name: Zip site
|
mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE}"
|
||||||
|
OFFLINE=true mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE_OFFLINE}"
|
||||||
|
|
||||||
|
- name: Zip offline site
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd "${MKDOCS_OUTPUT_DIR}"
|
cd "${RUNNER_TEMP}/mkdocs_out/site_offline/"
|
||||||
zip -r "${GITHUB_REF_NAME}.zip" "./offline"
|
zip -r "${GITHUB_REF_NAME}.zip" ./${GITHUB_REF_NAME}
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
- name: Publish prerelease
|
||||||
needs: build
|
|
||||||
steps:
|
|
||||||
# -------------------------
|
|
||||||
# RC-only step
|
|
||||||
# -------------------------
|
|
||||||
- name: Publish prerelease
|
|
||||||
if: startsWith(github.ref_name, 'rc')
|
if: startsWith(github.ref_name, 'rc')
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@@ -72,13 +67,10 @@ jobs:
|
|||||||
name: ${{ github.ref_name }}
|
name: ${{ github.ref_name }}
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ github.ref_name }}
|
||||||
body: |
|
body: |
|
||||||
Release candidate preview (if deployed): /rc/
|
Release candidate preview.
|
||||||
files: |
|
files: |
|
||||||
${{ runner.temp }}/${{ github.ref_name }}.zip
|
${{ runner.temp }}/mkdocs_out/site_offline/${{ github.ref_name }}.zip
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# Final release-only step
|
|
||||||
# -------------------------
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
if: startsWith(github.ref_name, 'v')
|
if: startsWith(github.ref_name, 'v')
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
@@ -86,51 +78,37 @@ jobs:
|
|||||||
name: ${{ github.ref_name }}
|
name: ${{ github.ref_name }}
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ github.ref_name }}
|
||||||
files: |
|
files: |
|
||||||
${{ runner.temp }}/${{ github.ref_name }}.zip
|
${{ runner.temp }}/mkdocs_out/site_offline/${{ github.ref_name }}.zip
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
- name: Checkout gh-pages branch
|
||||||
needs: build
|
|
||||||
steps:
|
|
||||||
- name: Checkout (tag)
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
ref: gh-pages
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Checkout gh-pages branch
|
|
||||||
|
- name: Deploy release to gh-pages root
|
||||||
|
if: startsWith(github.ref_name, 'v')
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
git fetch origin gh-pages:gh-pages || true
|
rm -rf ./*
|
||||||
if git show-ref --verify --quiet refs/heads/gh-pages; then
|
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. .
|
||||||
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 -rf assets styles search *{.html,.xml,xml.gz} || true
|
|
||||||
cp -a "${MKDOCS_OUTPUT_DIR}/dist/." ""
|
|
||||||
|
|
||||||
git add -A
|
git add -A
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
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 commit -m "Deploy release ${GITHUB_REF_NAME}" || echo "No changes to commit"
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
||||||
- name: Publish RC preview under /rc/<tag>/
|
- name: Deploy RC preview to /rc/
|
||||||
|
if: startsWith(github.ref_name, 'rc')
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
rm -rf "rc"* || true
|
rm -rf rc
|
||||||
mkdir -p "rc/"
|
mkdir -p rc
|
||||||
cp -a "${MKDOCS_OUTPUT_DIR}/dist/." "rc/"
|
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. rc/
|
||||||
|
printf '{"tag":"%s"}\n' "${GITHUB_REF_NAME}" > rc/rc.json
|
||||||
|
|
||||||
git add -A
|
git add -A
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
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 commit -m "Deploy RC preview ${GITHUB_REF_NAME}" || echo "No changes to commit"
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="assets/cmba-logo.svg" width="200">
|
<img src="docs/assets/cmba-logo.svg" width="200">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# CMBA Constitution and Bylaws
|
# CMBA Constitution and Bylaws
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
# CMBA Rulebooks
|
# CMBA Constitution and By-Laws
|
||||||
|
|
||||||
Use the navigation to view the documents.
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
site_name: CMBA Rulebook
|
site_name: CMBA Constitution and By-Laws
|
||||||
docs_dir: ../docs
|
docs_dir: ../docs
|
||||||
|
|
||||||
# Prevent accidental publishing of repo/CI/dev clutter
|
# Prevent accidental publishing of repo/CI/dev clutter
|
||||||
@@ -40,4 +40,4 @@ plugins:
|
|||||||
|
|
||||||
validation:
|
validation:
|
||||||
links:
|
links:
|
||||||
anchors: warn #this defaults to info, but it will cause broken links in anchor headers
|
anchors: warn #this defaults to info, but it will cause broken links in anchor headers
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ STRICT_FLAG=""
|
|||||||
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
if [ "${MKDOCS_STRICT}" = "true" ]; then
|
||||||
STRICT_FLAG="--strict"
|
STRICT_FLAG="--strict"
|
||||||
fi
|
fi
|
||||||
echo "MKDOCS_STRICT: $MKDOCS_STRICT, STRICT_FLAG: $STRICT_FLAG"
|
|
||||||
mkdocs build ${STRICT_FLAG} -f $MKDOCS_CONFIG -d $OUTPUT_DIR
|
mkdocs build ${STRICT_FLAG} -f $MKDOCS_CONFIG -d $OUTPUT_DIR
|
||||||
Reference in New Issue
Block a user