Skip to content

Merge pull request #99 from TaskarCenterAtUW/feat/2026-06-30/3965-bui… #79

Merge pull request #99 from TaskarCenterAtUW/feat/2026-06-30/3965-bui…

Merge pull request #99 from TaskarCenterAtUW/feat/2026-06-30/3965-bui… #79

# @format
name: Build and Deploy
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/configure-pages@v6
- uses: actions/checkout@v7.0.0
- uses: actions/setup-python@v6
with:
python-version: 3.x
cache: pip
- run: python -m pip install zensical
- run: |
mv docs/assistant /tmp/assistant-md
python3 - <<'EOF'
import os, shutil, re
src = '/tmp/assistant-md'
dst = 'docs/assistant'
for root, dirs, files in os.walk(src):
for fname in files:
if not fname.endswith('.md'):
continue
src_file = os.path.join(root, fname)
with open(src_file, encoding='utf-8') as f:
content = f.read()
if content.startswith('---'):
end = content.find('---', 3)
if end != -1:
fm = content[3:end]
if re.search(r'^\s*review_status\s*:\s*reviewed\s*$', fm, re.MULTILINE):
rel = os.path.relpath(src_file, src)
dst_file = os.path.join(dst, rel)
os.makedirs(os.path.dirname(dst_file), exist_ok=True)
shutil.copy2(src_file, dst_file)
EOF
- run: zensical build --clean
- run: cp -r /tmp/assistant-md/. site/assistant/
- uses: actions/upload-pages-artifact@v5
with:
path: site
- uses: actions/deploy-pages@v5
id: deployment