Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ffcd0f48aa | |||
| ac93876087 | |||
| 368cf3edca | |||
| 279a15f6ad | |||
| 69a34a5a82 | |||
| 7d7dbe5354 | |||
| ddb44e9846 | |||
| f1f4a69bd1 | |||
| dea9106556 | |||
| f7345b5433 | |||
| a5640d0e02 | |||
| 50252ece04 | |||
| 0fa737e74b | |||
| 973dbefabb | |||
| afd82d071c | |||
| ead328c075 | |||
| 155c9a4222 | |||
| bdbce0664b | |||
| c185079bf1 | |||
| 039228ab99 | |||
| 58d7f6be48 | |||
| 4dd5e308cf | |||
|
15be04dac7
|
|||
|
45da756495
|
|||
|
9de000a16d
|
|||
|
8af1ab6058
|
|||
|
042abe9f98
|
|||
|
25a43fe684
|
|||
|
c4d61f1a44
|
|||
|
b1776e0e39
|
|||
|
ac9d5374e9
|
|||
|
4913421231
|
|||
|
e1a827cfa1
|
|||
|
e9d6761121
|
|||
|
51896e9e28
|
|||
|
dff99c0dc3
|
|||
|
35238a60f3
|
|||
|
fbc5061e4a
|
|||
|
1d5d15c6b3
|
|||
|
0b893a5d8e
|
|||
|
9faeba6b7a
|
|||
|
b96bc44f47
|
|||
|
8d619fdc13
|
|||
|
cceacae86f
|
|||
|
cbb9b211b5
|
|||
|
f21b4efe4a
|
|||
|
376369f49b
|
|||
|
fabb2c69fd
|
|||
|
97486f02e1
|
76
.github/workflows/deploy-rc-pages.yml
vendored
Normal file
76
.github/workflows/deploy-rc-pages.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
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 }}
|
||||||
64
.github/workflows/release.yml
vendored
64
.github/workflows/release.yml
vendored
@@ -8,16 +8,15 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MKDOCS_CONFIG: mkdocs/mkdocs.yml
|
MKDOCS_CONFIG: mkdocs/mkdocs.yml
|
||||||
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout (tag)
|
- name: Checkout (tag)
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -34,7 +33,7 @@ jobs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
pip install -r mkdocs/requirements.txt
|
pip install -r mkdocs/requirements.txt
|
||||||
|
|
||||||
- name: Build docs (normal + offline, strict gate)
|
- name: Build docs (strict gate)
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
@@ -45,19 +44,46 @@ jobs:
|
|||||||
|
|
||||||
OUT_BASE="${RUNNER_TEMP}/mkdocs_out"
|
OUT_BASE="${RUNNER_TEMP}/mkdocs_out"
|
||||||
SITE="${OUT_BASE}/site"
|
SITE="${OUT_BASE}/site"
|
||||||
SITE_OFFLINE="${OUT_BASE}/site_offline/${GITHUB_REF_NAME}"
|
SITE_OFFLINE="${OUT_BASE}/site_offline"
|
||||||
|
|
||||||
rm -rf "${OUT_BASE}"
|
rm -rf "${OUT_BASE}"
|
||||||
mkdir -p "${SITE}" "${SITE_OFFLINE}"
|
mkdir -p "${SITE}" "${SITE_OFFLINE}"
|
||||||
|
|
||||||
|
# Normal build
|
||||||
mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE}"
|
mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE}"
|
||||||
|
|
||||||
|
# Offline build (only matters if your mkdocs.yml/plugins read OFFLINE)
|
||||||
OFFLINE=true mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE_OFFLINE}"
|
OFFLINE=true mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE_OFFLINE}"
|
||||||
|
|
||||||
|
- name: Upload site artifact (normal)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: site
|
||||||
|
path: ${{ runner.temp }}/mkdocs_out/site
|
||||||
|
|
||||||
|
- name: Upload site artifact (offline)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: site_offline
|
||||||
|
path: ${{ runner.temp }}/mkdocs_out/site_offline
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download offline site artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: site_offline
|
||||||
|
path: site_offline
|
||||||
|
|
||||||
- name: Zip offline site
|
- name: Zip offline site
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd "${RUNNER_TEMP}/mkdocs_out/site_offline/"
|
zip -r "${GITHUB_REF_NAME}.zip" site_offline
|
||||||
zip -r "${GITHUB_REF_NAME}.zip" ./${GITHUB_REF_NAME}
|
|
||||||
|
|
||||||
- name: Publish prerelease
|
- name: Publish prerelease
|
||||||
if: startsWith(github.ref_name, 'rc')
|
if: startsWith(github.ref_name, 'rc')
|
||||||
@@ -67,9 +93,9 @@ jobs:
|
|||||||
name: ${{ github.ref_name }}
|
name: ${{ github.ref_name }}
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ github.ref_name }}
|
||||||
body: |
|
body: |
|
||||||
Release candidate preview.
|
Release candidate preview (if deployed): /rc/
|
||||||
files: |
|
files: |
|
||||||
${{ runner.temp }}/mkdocs_out/site_offline/${{ github.ref_name }}.zip
|
${{ github.ref_name }}.zip
|
||||||
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
if: startsWith(github.ref_name, 'v')
|
if: startsWith(github.ref_name, 'v')
|
||||||
@@ -78,7 +104,20 @@ jobs:
|
|||||||
name: ${{ github.ref_name }}
|
name: ${{ github.ref_name }}
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ github.ref_name }}
|
||||||
files: |
|
files: |
|
||||||
${{ runner.temp }}/mkdocs_out/site_offline/${{ github.ref_name }}.zip
|
${{ github.ref_name }}.zip
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download normal site artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: site
|
||||||
|
path: site
|
||||||
|
|
||||||
- name: Checkout gh-pages branch
|
- name: Checkout gh-pages branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -91,7 +130,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
rm -rf ./*
|
rm -rf ./*
|
||||||
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. .
|
cp -a ../site/. .
|
||||||
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"
|
||||||
@@ -104,7 +143,8 @@ jobs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
rm -rf rc
|
rm -rf rc
|
||||||
mkdir -p rc
|
mkdir -p rc
|
||||||
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. rc/
|
cp -a ../site/. rc/
|
||||||
|
# optional metadata for your toolbar link idea:
|
||||||
printf '{"tag":"%s"}\n' "${GITHUB_REF_NAME}" > rc/rc.json
|
printf '{"tag":"%s"}\n' "${GITHUB_REF_NAME}" > rc/rc.json
|
||||||
|
|
||||||
git add -A
|
git add -A
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="docs/assets/cmba-logo.svg" width="200">
|
<img src="assets/cmba-logo.svg" width="200">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# CMBA Constitution and Bylaws
|
# CMBA Constitution and Bylaws
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
# CMBA Constitution and By-Laws
|
# CMBA Rulebooks
|
||||||
|
|
||||||
|
Use the navigation to view the documents.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
site_name: CMBA Constitution and By-Laws
|
site_name: CMBA Rulebook
|
||||||
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