ci: nepublikovat prázdný build a zjistit, proč render mlčí
Publish site / build-deploy (push) Failing after 2s

Běh #5 skončil "success", ale quarto render nic nevypsal a _site zůstal
prázdný, čímž se smazal obsah gh-pages. Přidána kontrola _site/index.html
v renderu i v deploy kroku a diagnostický výpis (pwd, ls, quarto --version).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
gitea-actionsandClaude Opus 5 committed 2026-08-13 18:44:46 +02:00
1 parent a66743df15
commit c90170345d
1 file changed
+15 -1
+15 -1
View File
@@ -39,13 +39,27 @@ jobs:
fi
- name: Render
run: "$HOME/opt/quarto-${QUARTO_VERSION}/bin/quarto render"
run: |
set -e
cd "$GITHUB_WORKSPACE"
QUARTO="$HOME/opt/quarto-${QUARTO_VERSION}/bin/quarto"
echo "pwd=$(pwd)"
ls -la
"$QUARTO" --version
"$QUARTO" render 2>&1
echo "--- obsah _site ---"
find _site -maxdepth 2 2>/dev/null | head -30
# pojistka: prázdný build nesmí přepsat publikovaný web
test -f _site/index.html
- name: Deploy to gh-pages
env:
TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
set -e
cd "$GITHUB_WORKSPACE"
# pojistka: bez index.html v _site se nepublikuje nic
test -f _site/index.html
REMOTE="https://x-access-token:${TOKEN}@${GITEA_HOST}/${GITHUB_REPOSITORY}.git"
WT="/tmp/gh-pages-${GITHUB_RUN_ID}"
trap 'rm -rf "$WT"' EXIT