Files
pplus-web/scripts/assemble.sh
T
2026-10-05 03:03:38 +00:00

15 lines
811 B
Bash
Executable File

#!/usr/bin/env sh
# Assemble the deployable site into ./site: what a static host needs (the page, its styles, dist/, and the Quarto extension).
set -eu
cd "$(dirname "$0")/.."
rm -rf site && mkdir -p site
cp -r index.html styles.css styles dist site/
rm -f site/styles/course/README.md # the provenance notes stay in the repository
rm -rf site/dist/curriculum # a test fixture for the interpreter; the site no longer loads it
# the Quarto extension, which the "With Quarto" page loads (pplus.css, pplus.js) and links to, file by file
mkdir -p site/quarto/_extensions
cp -r quarto/_extensions/pplus site/quarto/_extensions/
rm -rf site/quarto/_extensions/pplus/engine
printf '%s\n' "${GITHUB_SHA:-$(git rev-parse HEAD 2>/dev/null || echo dev)}" > site/VERSION
echo "site/ assembled ($(du -sh site | cut -f1))"