From d9f2131a8854d7127a28c30bdb5e229c5d989435 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Thu, 10 Jul 2025 15:33:04 +0100 Subject: [PATCH] chore: update README with deploy details --- README.md | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 40a6c85..b527955 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,28 @@ # Systems Obscure -[![Build Status](https://forgejo.systemsobscure.net/thomasabishop/systems-obscure/badges/workflows/deploy.svg)](https://forgejo.systemsobscure.net/thomasabishop/systems-obscure/actions) - > My personal blog at > [https://systemsobscure.net](https://www.systemsobscure.net) +## Pre-build + +```sh +npm run build:posts +``` + +Parse Markdown blog posts in `/posts` and generate JSON index which is used to +populate core content. + +## Development server + +```sh +npm run build:posts +npm run dev +``` + ## Build ```sh +npm run build:posts npm run build ``` @@ -17,17 +32,13 @@ transpilation of TSX to JSX. I am using TypeScript so that I can use the about types in this project and all my components are written as JSX. SWC transpiles very quickly without throwing TS warning and errors. -I still use Vite's native `esbuild` for HMR transpilation in development. +## Deploy -## Scripts +Deployment automated via +[Forgejo action](https://forgejo.org/docs/next/user/actions/reference/). See +[deploy.yml](https://forgejo.systemsobscure.net/thomasabishop/systems-obscure/src/branch/main/.forgejo/workflows/deploy.yaml). -### Generate post index - -```sh -npm run build:posts -``` - -This runs `scripts/generate-post-index.js` which reads all raw Markdown posts in -`/posts` and parses the body content and YAML front-matter. It then writes this -data to `public/post-index.json` which is read by the React application at -runtime. +Runs the build script, then transfers transpiled `dist/` directory to my +[Virtual Private Server](https://forgejo.systemsobscure.net/thomasabishop/self-host) +from where it is served at +[systemsobscure.blog](https://www.systemsobscure.blog).