Files
slide/scripts/build.sh
T
wonder b86fb28d14
Deploy Slides / build-and-deploy (push) Successful in 1m41s
fix: use POSIX sh instead of bash for Alpine CI compatibility
The node:22-alpine container doesn't have bash installed,
causing `sh: bash: not found` in the build step.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 13:35:53 +08:00

20 lines
398 B
Bash
Executable File

#!/bin/sh
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
DIST="$ROOT/dist"
rm -rf "$DIST"
mkdir -p "$DIST"
cp "$ROOT/index.html" "$DIST/index.html"
for dir in "$ROOT"/decks/*/; do
[ -d "$dir" ] || continue
name="$(basename "$dir")"
echo "Building deck: $name"
pnpm exec slidev build "$dir/slides.md" --base "/$name/" --out "$DIST/$name"
done
echo "Done. Output: $DIST"
ls -la "$DIST"