616f93ccf44f91ccd6bb73f47dee737435d6b459
jnss-web
Static website for jnss.me - built with SvelteKit and deployed via Caddy.
Project Structure
This project uses a two-branch deployment strategy:
mainbranch: Source code and development- Contains all source files, configuration, and build tooling
build/directory is gitignored
deploybranch: Orphan branch with build outputs only- Contains only the static build artifacts (index.html, _app/, etc.)
- No source code or build dependencies
- Used by Ansible/Caddy for serving the site
Development
Install dependencies:
bun install
Start development server:
bun run dev
# or open in browser automatically
bun run dev -- --open
Building
Build the static site:
bun run build
Preview the production build locally:
bun run preview
Deployment
This project uses an automated deployment script that builds and pushes to the deploy branch:
# Deploy with auto-generated timestamp commit message
./deploy.sh
# Deploy with custom commit message
./deploy.sh "Add new feature X"
What the script does:
- Builds the site on the
mainbranch (bun run build) - Switches to the
deploybranch - Clears old build files
- Moves new build output to the root of
deploybranch - Commits and pushes to
origin/deploy - Switches back to
mainbranch
For rick-infra:
The Ansible role clones the deploy branch to get production-ready static files:
git clone -b deploy git@jnss.me:joakim/jnss-web.git
Tech Stack
- Framework: SvelteKit 2.x with static adapter
- Build Tool: Vite 7.x
- Package Manager: Bun
- Deployment: Two-branch strategy (main → source, deploy → build artifacts)
- Hosting: Caddy (configured via rick-infra)
Description
Languages
Svelte
38.2%
CSS
25.2%
Shell
23.4%
JavaScript
9.1%
HTML
4.1%