feat: SPA routing, projects/resume sections, deployment infra
- Add client-side router with History API pushState (router.ts, pages.ts) - Extend overlay with projects grid/category/detail views and resume section - Add Gitea CI/CD workflow and webhook deployment server - Improve Docker Compose with nginx reverse proxy config - Add deployment script and .env.example
This commit is contained in:
28
scripts/deploy.sh
Executable file
28
scripts/deploy.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# deploy.sh — manual deploy (pull + rebuild + health check)
|
||||
# Run this on the server when you don't want to wait for a webhook trigger.
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
cd "$REPO_DIR"
|
||||
|
||||
echo "=== Pulling latest code ==="
|
||||
git pull origin master
|
||||
|
||||
echo "=== Running tests ==="
|
||||
npm ci --silent
|
||||
npm test
|
||||
|
||||
echo "=== Rebuilding & restarting ==="
|
||||
docker compose up -d --build --remove-orphans
|
||||
|
||||
echo "=== Waiting for health checks ==="
|
||||
sleep 3
|
||||
docker compose ps
|
||||
|
||||
echo "=== Smoke test ==="
|
||||
curl -sf http://localhost:80/health > /dev/null && echo "OK — /health passed" || echo "WARN — /health failed"
|
||||
|
||||
echo ""
|
||||
echo "Done. App is live."
|
||||
Reference in New Issue
Block a user