15 lines
523 B
Bash
Executable File
15 lines
523 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
site=$(cd "$(dirname "$0")" && pwd)
|
|
mac=$(dirname "$site")/mac
|
|
CLOUDFLARE_API_TOKEN=$(security find-generic-password -s byre-cloudflare -w)
|
|
CLOUDFLARE_ACCOUNT_ID=96e4d3199efaa07ddc5c33e0e2d59c01
|
|
export CLOUDFLARE_API_TOKEN CLOUDFLARE_ACCOUNT_ID
|
|
|
|
stage=$(mktemp -d)
|
|
trap 'rm -rf "$stage"' EXIT
|
|
cp "$site/index.html" "$mac/icon.svg" "$stage/"
|
|
mkdir "$stage/fonts"
|
|
cp "$mac"/fonts/*.woff2 "$stage/fonts/"
|
|
npx --yes wrangler@4.151.2 pages deploy "$stage" --project-name byre --branch main --commit-dirty=true
|