update how it was made post
Some checks failed
Deploy Blog / deploy (push) Has been cancelled

This commit is contained in:
jawhng
2025-12-22 21:12:20 +00:00
parent 79e3d77b66
commit d17f01e13b

View File

@@ -45,6 +45,28 @@ There's also an About page and a Music page. Both are markdown files. Both are p
It's using `@sveltejs/adapter-static` because this gets deployed to static hosting. No server-side rendering, no edge functions, no complexity. Just HTML, CSS, and JavaScript being served like it's 2005.
## The Deployment Pipeline (A Journey Through Pain)
**Initial Plan:** Set up Gitea Actions for that sweet CI/CD professionalism. GitHub Actions syntax, portable workflows, something to show employers.
**Reality Check:** The runner lives in Docker. Docker doesn't have access to the host's nvm. The host has nvm. The runner doesn't care. Workflow hangs on "Setting up Node.js" forever. Abandon ship.
**Current Solution:** A Python Flask webhook receiver that:
1. Listens on port 9001 (port 9000 was taken by something I'll never identify)
2. Gets a POST from Gitea when I push to `main`
3. Runs a bash script that has more environment variable exports than actual logic
4. Responds with 200 OK immediately because Gitea has commitment issues and times out after 10 seconds
The deployment script sources nvm, adds pnpm to PATH (because it lives in `~/.local/share/pnpm` for reasons), pulls the latest code, runs `pnpm install && pnpm run build`, and copies everything to an nginx container.
It runs in a background thread because build times are longer than webhook timeouts. Logs go to both systemd journal and a file because Python's stdout buffering makes systemd sad.
**Total complexity:** Higher than just SSHing in and running a script manually.
**Total convenience:** Also higher than just SSHing in and running a script manually.
**Conclusion:** Worth it? Ask me in six months when I've forgotten how it works and have to debug it at 2 AM.
## Conclusion
This site was built in a couple hours with SvelteKit, some questionable design choices, and the crushing realization that web development in 2025 is somehow both easier and more complicated than it was 5 years ago.