From 2cd0b1c0713d83ad02cde61673d7aadb4b6a8361 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 22:45:42 +0000 Subject: [PATCH] fix: ensure bizard-skill.zip is reliably included in gh-pages deployment Agent-Logs-Url: https://github.com/openbiox/Bizard/sessions/506f0e2c-501c-4472-aade-bcf3155872b3 Co-authored-by: ShixiangWang <25057508+ShixiangWang@users.noreply.github.com> --- .../workflows/quarto-publish-update-cache.yml | 15 ++++++++++ .github/workflows/quarto-publish.yml | 30 +++++++++++-------- .gitignore | 3 ++ _quarto.yml | 1 + 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.github/workflows/quarto-publish-update-cache.yml b/.github/workflows/quarto-publish-update-cache.yml index ad04877767..e07682dedc 100644 --- a/.github/workflows/quarto-publish-update-cache.yml +++ b/.github/workflows/quarto-publish-update-cache.yml @@ -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 }} diff --git a/.github/workflows/quarto-publish.yml b/.github/workflows/quarto-publish.yml index 6ddaf382f3..50ba92ca59 100644 --- a/.github/workflows/quarto-publish.yml +++ b/.github/workflows/quarto-publish.yml @@ -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 diff --git a/.gitignore b/.gitignore index 541621add0..4d5f2475e0 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/_quarto.yml b/_quarto.yml index 0f462252eb..2a37538e21 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -10,6 +10,7 @@ project: resources: - "files/*.csv" - "files/*.json" + - "bizard-skill.zip" execute: freeze: auto # never re-render during project render