chore: remove private deployment details
This commit is contained in:
parent
6148595e78
commit
7396323847
3 changed files with 10 additions and 15 deletions
|
|
@ -18,8 +18,7 @@
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"typecheck": "tsc -b --noEmit",
|
"typecheck": "tsc -b --noEmit",
|
||||||
"check:guides": "node --experimental-strip-types tools/check-guides.ts",
|
"check:guides": "node --experimental-strip-types tools/check-guides.ts"
|
||||||
"deploy": "sh tools/deploy.sh"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"idb": "8.0.3",
|
"idb": "8.0.3",
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# Build and publish to [removed].
|
# Build and publish to a user-supplied static host.
|
||||||
#
|
|
||||||
# The homelab has no rsync, so the tree goes over as a tar stream. Caddy serves
|
|
||||||
# /mnt/docker/appdata/caddy/sites/[removed] as /srv/[removed] (a
|
|
||||||
# read-only bind mount declared in /mnt/docker/compose/caddy/docker-compose.yml),
|
|
||||||
# so a deploy is a file copy - no container restart, no config reload.
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
HOST="${DEPLOY_HOST:-hl}"
|
: "${DEPLOY_HOST:?set DEPLOY_HOST}"
|
||||||
DEST="${DEPLOY_DEST:-/mnt/docker/appdata/caddy/sites/[removed]}"
|
: "${DEPLOY_DEST:?set DEPLOY_DEST}"
|
||||||
|
HOST="$DEPLOY_HOST"
|
||||||
|
DEST="$DEPLOY_DEST"
|
||||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
|
||||||
cd "$ROOT"
|
cd "$ROOT"
|
||||||
|
|
@ -20,6 +17,6 @@ npm run build:single
|
||||||
# served forever, since /assets/* is cached as immutable.
|
# served forever, since /assets/* is cached as immutable.
|
||||||
tar -C dist -cz . | ssh "$HOST" "rm -rf '$DEST'/* && tar -C '$DEST' -xz"
|
tar -C dist -cz . | ssh "$HOST" "rm -rf '$DEST'/* && tar -C '$DEST' -xz"
|
||||||
|
|
||||||
printf '\ndeployed. checking...\n'
|
if [ -n "${DEPLOY_URL:-}" ]; then
|
||||||
curl -fsS -o /dev/null -w '[removed] -> %{http_code}\n' [removed]
|
curl -fsS -o /dev/null -w '%{http_code}\n' "$DEPLOY_URL"
|
||||||
curl -fsS -o /dev/null -w '[removed] -> %{http_code} (%{size_download} bytes)\n' [removed]
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
|
|
||||||
// `base: './'` keeps the build working unchanged at [removed], under a
|
// Relative assets keep the build portable across static hosts, local HTTP, and the single-file build.
|
||||||
// plain `python3 -m http.server -d dist`, and inside the single-file build.
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: "./",
|
base: "./",
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue