From 922f8a6f34f9cb64d3117b3ec59c7d4753d09b2f Mon Sep 17 00:00:00 2001 From: Simon Gagnon Date: Sun, 1 Nov 2026 16:31:40 -0500 Subject: [PATCH] deploy: drop the Pages deploy; the agentic-dev-setup project is gone Both hosts are Workers now (bercail-site, setup-simoncrypta-dev), and CI's first deploy with a token failed on the missing Pages project. Remove the Pages config, the public/ sync and the Pages DNS script. --- .gitignore | 3 -- docs/development.md | 2 +- package.json | 4 +- public/_redirects | 2 - scripts/ensure-setup-dns.sh | 83 ------------------------------------- scripts/sync-public.sh | 10 ----- wrangler.toml | 6 --- 7 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 public/_redirects delete mode 100755 scripts/ensure-setup-dns.sh delete mode 100755 scripts/sync-public.sh delete mode 100644 wrangler.toml diff --git a/.gitignore b/.gitignore index eb0b63b..c80d990 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,6 @@ *~ node_modules/ .wrangler/ -public/install.sh -public/manifest.json -public/lib/ # Written by `herdr-app check` beside a mod; the app supplies its own. bercail/mods/*/gpui-kit.d.ts diff --git a/docs/development.md b/docs/development.md index 3da4c00..6eb1bf0 100644 --- a/docs/development.md +++ b/docs/development.md @@ -9,7 +9,7 @@ herdr-app check bercail/mods/bercail-agents for t in tests/*_test.sh; do bash "$t" || break; done ./install.sh --help bin/bercail dry-run # this checkout's CLI; a bare `bercail` runs the installed copy -npm ci && npm run deploy # sync public/, deploy Pages, the setup.simoncrypta.dev Worker and the site +npm ci && npm run deploy # deploy the setup.simoncrypta.dev Worker and the site npm run build:site && npx wrangler dev --config site/wrangler.jsonc # the bercail.dev site locally ``` diff --git a/package.json b/package.json index 2414935..ed4f98f 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,7 @@ "name": "agentic-dev-setup", "private": true, "scripts": { - "predeploy": "bash scripts/sync-public.sh", - "deploy": "wrangler pages deploy public --project-name=agentic-dev-setup && wrangler deploy --config workers/setup-domain/wrangler.jsonc && npm run deploy:site", - "deploy:pages": "npm run predeploy && wrangler pages deploy public --project-name=agentic-dev-setup", + "deploy": "npm run deploy:domain && npm run deploy:site", "deploy:domain": "wrangler deploy --config workers/setup-domain/wrangler.jsonc", "build:site": "astro build --root site", "deploy:site": "npm run build:site && wrangler deploy --config site/wrangler.jsonc" diff --git a/public/_redirects b/public/_redirects deleted file mode 100644 index dd5d829..0000000 --- a/public/_redirects +++ /dev/null @@ -1,2 +0,0 @@ -# Root → GitHub repo (301 permanent). Install assets stay on this host. -/ https://github.com/simoncrypta/bercail 301 diff --git a/scripts/ensure-setup-dns.sh b/scripts/ensure-setup-dns.sh deleted file mode 100755 index d786f92..0000000 --- a/scripts/ensure-setup-dns.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash -# Create/update the setup.simoncrypta.dev CNAME for agentic-dev-setup Pages. -# Requires CLOUDFLARE_API_TOKEN with Zone.DNS Edit on simoncrypta.dev. -set -euo pipefail - -ACCOUNT_ID="${CLOUDFLARE_ACCOUNT_ID:-0911918246a46bfced4610f39e6b7eb5}" -ZONE_NAME="${CLOUDFLARE_ZONE:-simoncrypta.dev}" -DOMAIN="${SETUP_DOMAIN:-setup.simoncrypta.dev}" -PROJECT="${PAGES_PROJECT:-agentic-dev-setup}" -API="https://api.cloudflare.com/client/v4" - -if [[ -z "${CLOUDFLARE_API_TOKEN:-}" ]]; then - printf 'error: set CLOUDFLARE_API_TOKEN (Zone.DNS Edit on %s)\n' "$ZONE_NAME" >&2 - printf 'Create one at: https://dash.cloudflare.com/profile/api-tokens\n' >&2 - exit 1 -fi - -auth() { printf 'Authorization: Bearer %s' "$CLOUDFLARE_API_TOKEN"; } - -api() { - local method="$1" url="$2" body="${3:-}" - if [[ -n "$body" ]]; then - curl -fsS -X "$method" -H "$(auth)" -H "Content-Type: application/json" \ - "$url" -d "$body" - else - curl -fsS -X "$method" -H "$(auth)" "$url" - fi -} - -TARGET="$(api GET "$API/accounts/$ACCOUNT_ID/pages/projects/$PROJECT" \ - | python3 -c "import json,sys; print(json.load(sys.stdin)['result']['subdomain'])")" - -ZONE_ID="$(api GET "$API/zones?name=$ZONE_NAME" \ - | python3 -c "import json,sys; r=json.load(sys.stdin)['result']; print(r[0]['id'])")" - -ENCODED="$(python3 -c "import urllib.parse; print(urllib.parse.quote('$DOMAIN'))")" -EXISTING="$(api GET "$API/zones/$ZONE_ID/dns_records?type=CNAME&name=$ENCODED" \ - | python3 -c "import json,sys; print(json.dumps(json.load(sys.stdin).get('result') or []))")" - -PAYLOAD="$(python3 - </dev/null - printf 'updated DNS: %s -> %s\n' "$DOMAIN" "$TARGET" -else - api POST "$API/zones/$ZONE_ID/dns_records" "$PAYLOAD" >/dev/null - printf 'created DNS: %s -> %s\n' "$DOMAIN" "$TARGET" -fi - -# Ensure Pages custom domain is attached (idempotent). -api GET "$API/accounts/$ACCOUNT_ID/pages/projects/$PROJECT/domains/$DOMAIN" >/dev/null 2>&1 \ - || api POST "$API/accounts/$ACCOUNT_ID/pages/projects/$PROJECT/domains" \ - "{\"name\":\"$DOMAIN\"}" >/dev/null - -printf 'waiting for Pages domain activation...\n' -for _ in $(seq 1 30); do - STATUS="$(api GET "$API/accounts/$ACCOUNT_ID/pages/projects/$PROJECT/domains/$DOMAIN" \ - | python3 -c "import json,sys; print(json.load(sys.stdin)['result']['status'])")" - printf ' status: %s\n' "$STATUS" - [[ "$STATUS" == "active" ]] && break - sleep 5 -done - -printf 'verify: dig +short %s\n' "$DOMAIN" -dig +short "$DOMAIN" A AAAA CNAME || true diff --git a/scripts/sync-public.sh b/scripts/sync-public.sh deleted file mode 100755 index 18f62e8..0000000 --- a/scripts/sync-public.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -# Copy install CDN assets into public/ before Pages deploy. -set -euo pipefail - -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -PUBLIC="$ROOT/public" - -mkdir -p "$PUBLIC/lib" -cp "$ROOT/install.sh" "$ROOT/manifest.json" "$PUBLIC/" -cp "$ROOT/lib/"*.sh "$PUBLIC/lib/" diff --git a/wrangler.toml b/wrangler.toml deleted file mode 100644 index 67595a0..0000000 --- a/wrangler.toml +++ /dev/null @@ -1,6 +0,0 @@ -# Cloudflare Pages — static hosting for install.sh and configs -# Deploy: npm run deploy (or: npx wrangler pages deploy) - -name = "agentic-dev-setup" -compatibility_date = "2024-01-01" -pages_build_output_dir = "./public"