Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/quarto-publish-update-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,21 @@ jobs:
fi
[ $failed -eq 0 ] || exit 1

# ── Generate skill ZIP ───────────────────────────────────
# Must run BEFORE babelquarto so the zip exists at project root when
# babelquarto copies the project to its temp dir for rendering.
# Quarto then copies it to _site/ via the resources entry in _quarto.yml.
- name: Generate unified skill ZIP package
run: |
SKILL_TMP=$(mktemp -d)
cp SKILL.md "${SKILL_TMP}/SKILL.md"
cp files/gallery_data.csv "${SKILL_TMP}/gallery_data.csv"
cp files/gallery_data_zh.csv "${SKILL_TMP}/gallery_data_zh.csv"
cp files/bizard-skill-readme.md "${SKILL_TMP}/README.md"
(cd "${SKILL_TMP}" && zip -r - SKILL.md gallery_data.csv gallery_data_zh.csv README.md) > bizard-skill.zip
rm -rf "${SKILL_TMP}"
echo "✅ Created bizard-skill.zip at project root ($(du -h bizard-skill.zip | cut -f1))"

- name: Render website with Babelquarto
env:
TMPDIR: ${{ env.TMP_DIR }}
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,27 +440,31 @@ jobs:
TOTAL_FROZEN=$(find _freeze -name "*.json" -type f 2>/dev/null | wc -l)
echo "❄️ Freeze cache now has $TOTAL_FROZEN frozen output(s) (JSON entries)"

- name: Render website with Babelquarto
env:
TMPDIR: ${{ env.TMP_DIR }}
TMP: ${{ env.TMP_DIR }}
TEMP: ${{ env.TMP_DIR }}
R_COMPILE_PKGS: 0
QUARTO_JULIA_PROJECT: ${{ env.QUARTO_JULIA_PROJECT }}
run: Rscript -e 'babelquarto::render_website()'

# ── Generate skill ZIP ───────────────────────────────────
# Must run BEFORE babelquarto so the zip exists at project root when
# babelquarto copies the project to its temp dir for rendering.
# Quarto then copies it to _site/ via the resources entry in _quarto.yml,
# ensuring quarto publish gh-pages reliably includes it.
- name: Generate unified skill ZIP package
run: |
mkdir -p _site/
# Stage files with correct names for the zip
# Stage files with correct names inside the zip
SKILL_TMP=$(mktemp -d)
cp SKILL.md "${SKILL_TMP}/SKILL.md"
cp files/gallery_data.csv "${SKILL_TMP}/gallery_data.csv"
cp files/gallery_data_zh.csv "${SKILL_TMP}/gallery_data_zh.csv"
cp files/bizard-skill-readme.md "${SKILL_TMP}/README.md"
(cd "${SKILL_TMP}" && zip -r - SKILL.md gallery_data.csv gallery_data_zh.csv README.md) > _site/bizard-skill.zip
(cd "${SKILL_TMP}" && zip -r - SKILL.md gallery_data.csv gallery_data_zh.csv README.md) > bizard-skill.zip
rm -rf "${SKILL_TMP}"
echo "✅ Created _site/bizard-skill.zip ($(du -h _site/bizard-skill.zip | cut -f1))"
echo "✅ Created bizard-skill.zip at project root ($(du -h bizard-skill.zip | cut -f1))"

- name: Render website with Babelquarto
env:
TMPDIR: ${{ env.TMP_DIR }}
TMP: ${{ env.TMP_DIR }}
TEMP: ${{ env.TMP_DIR }}
R_COMPILE_PKGS: 0
QUARTO_JULIA_PROJECT: ${{ env.QUARTO_JULIA_PROJECT }}
run: Rscript -e 'babelquarto::render_website()'

# ── Save freeze cache (ALWAYS – even on failure) ─────────
# This is the key to reducing wasted work across consecutive
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ skills/**/*_skill.md

# Entire skills/ directory (superseded by SKILL.md)
skills/

# Generated skill ZIP (built by CI from SKILL.md + CSV files; deployed to _site/ via resources)
bizard-skill.zip
1 change: 1 addition & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ project:
resources:
- "files/*.csv"
- "files/*.json"
- "bizard-skill.zip"

execute:
freeze: auto # never re-render during project render
Expand Down
Loading