docs(config): add deploy command, update README and CLAUDE.md
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 27s

Adds bun run deploy script, deployment docs to README, and updates
CLAUDE.md with deployment info, current patterns, and rule to keep
docs in sync with changes.
This commit is contained in:
Sanil Chawla
2026-02-12 00:00:10 -08:00
parent b750970770
commit 1275e58d55
3 changed files with 36 additions and 11 deletions

View File

@@ -1,8 +1,13 @@
# CLAUDE.md
## Important Rules
- **Always update `CLAUDE.md` and `README.md`** when making changes that affect project structure, commands, deployment, tooling, or conventions. Keep them in sync.
- Do not include co-author lines or "Generated by" attributions in commit messages.
## Project Overview
Lofty is a 501(c)(4) social welfare organization connecting creative professionals with the progressive movement. This repo is the **pre-launch landing page** — a single-page static site to collect email signups.
The Lofty Project is a 501(c)(4) connecting creative talent with leftist organizing. This repo is the **pre-launch landing page** — a single-page static site with interest signup links.
**Stack:** Astro 5 (static output), TypeScript, Bun 1.3+
@@ -11,10 +16,13 @@ Lofty is a 501(c)(4) social welfare organization connecting creative professiona
```
src/
layouts/Layout.astro # HTML shell, meta tags, Typekit fonts, design tokens, CSS reset
pages/index.astro # All page sections (hero, pillars, signup form, footer), scoped CSS, client JS
pages/index.astro # All page sections (hero, pillars, signup, footer), scoped CSS, client JS
public/
favicon.svg # Stylized "L" mark
hero-bg.webp/.jpg # Hero background image (WebP + JPEG fallback)
astro.config.mjs # Static output, site URL, dev toolbar disabled
wrangler.toml # Cloudflare Pages deployment config
.gitea/workflows/ # CI/CD via Gitea Actions
```
Two-file architecture: `Layout.astro` (global concerns) + `index.astro` (all content). No component files — single page with no reuse opportunity.
@@ -27,6 +35,16 @@ bun run build # Static build to dist/
bun run preview # Preview production build
```
## Deployment
Deploys to **Cloudflare Pages** via Gitea Actions on push to `main`.
```bash
bun run deploy # Build + deploy to Cloudflare Pages (manual)
```
Config lives in `wrangler.toml`. CI requires `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` as Gitea secrets.
## Linting & Formatting
Uses **Biome** for both linting and formatting.
@@ -53,8 +71,6 @@ Format: `type(scope): subject`
bun run commit # Guided commit via commitizen (cz-git)
```
Do not include co-author lines or "Generated by" attributions in commit messages.
## Git Hooks (Lefthook)
- **pre-commit:** Biome check on staged files
@@ -63,19 +79,17 @@ Do not include co-author lines or "Generated by" attributions in commit messages
## Design Tokens
Colors, typography, and spacing are defined as CSS custom properties in `Layout.astro`:
Colors, typography, spacing, and easing are defined as CSS custom properties in `Layout.astro`:
- **Colors:** cream (#F5F0EB), dusty-rose (#C48B8B), slate-blue (#8A9BB5), navy (#1A1F2E)
- **Fonts:** `neue-haas-grotesk-display` (body, weight 500), `meno-text` (display/headings) via Typekit
- **Spacing/type:** Fluid scales using `clamp()`
## Environment Variables
- `PUBLIC_SIGNUP_ENDPOINT` — Form submission endpoint (defaults to `/api/signup`). See `.env.example`.
- **Easing:** `--ease-out-quart` (hover), `--ease-in-out` (layout/entrance animations)
## Key Patterns
- All scroll animations use `.reveal` class + IntersectionObserver (threshold 0.1, -40px root margin)
- Hero animations are CSS-only with staggered delays via `--i` custom property
- Hero animations: line-by-line blur-in reveal with staggered delays, quartic ease-out
- Hover interactions use `--ease-out-quart`, layout/entrance animations use `--ease-in-out`
- `prefers-reduced-motion` is detected via inline script and disables all animations via `.reduce-motion` class
- Form handler uses progressive enhancement — works as standard POST without JS
- Hero background image uses blur + desaturation + cream overlay for glassmorphic effect

View File

@@ -15,6 +15,16 @@ bun run build # Static build to dist/
bun run preview # Preview production build
```
## Deployment
Deploys to Cloudflare Pages via Gitea Actions on push to `main`. To deploy manually:
```sh
bun run deploy # Build + deploy to Cloudflare Pages
```
Requires `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` (set as Gitea secrets for CI, or via `wrangler login` locally).
## Linting & Formatting
```sh

View File

@@ -12,6 +12,7 @@
"format": "biome format --write .",
"format:check": "biome format .",
"commit": "cz",
"deploy": "astro build && wrangler pages deploy",
"prepare": "lefthook install"
},
"dependencies": {