Skip to content

Commit 2fa728e

Browse files
author
Song Mingxu
committed
Migrate root GitHub Pages site to Astro
1 parent 864616d commit 2fa728e

16 files changed

Lines changed: 6636 additions & 516 deletions

.github/workflows/deploy-pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build Astro site
35+
run: npm run build
36+
37+
- name: Upload GitHub Pages artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: ./dist
41+
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
.omx/
22
.firecrawl/
33
.DS_Store
4+
node_modules/
5+
dist/
6+
.astro/

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Its purpose is to continuously study the space, compare different implementation
1010

1111
## Public Homepage
1212

13-
The public-facing overview is published through GitHub Pages from the repository root.
13+
The public-facing overview is published through GitHub Pages using an Astro root site.
1414

15-
- Homepage source: [`index.html`](./index.html)
16-
- Homepage stylesheet: [`site.css`](./site.css)
15+
- Homepage entry: [`src/pages/index.astro`](./src/pages/index.astro)
16+
- Homepage data: [`src/data/homepage.ts`](./src/data/homepage.ts)
17+
- Homepage styles: [`src/styles/global.css`](./src/styles/global.css)
18+
- Pages workflow: [`.github/workflows/deploy-pages.yml`](./.github/workflows/deploy-pages.yml)
1719

1820
The homepage is the repository's guide and outline:
1921

@@ -41,6 +43,17 @@ The homepage is the repository's guide and outline:
4143
- Deeper work goes into independent topics.
4244
- The repository should keep expanding by topic, not by piling implementation detail into the root.
4345

46+
## Build
47+
48+
Install dependencies and build the root site:
49+
50+
```bash
51+
npm install
52+
npm run build
53+
```
54+
55+
This builds the Astro root site into `dist/` and then copies any separately-built topic sites found at `topics/*/site/` into the final Pages artifact.
56+
4457
## License
4558

4659
This repository is licensed under the MIT License. See [`LICENSE`](./LICENSE) for details.

astro.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from "astro/config";
2+
3+
export default defineConfig({
4+
site: "https://bemxself.github.io",
5+
base: "/everything-harness-engineering",
6+
output: "static",
7+
});

index.html

Lines changed: 0 additions & 496 deletions
This file was deleted.

0 commit comments

Comments
 (0)