Skip to content

Commit 80f6df9

Browse files
committed
chore: remove unused package.json for wiki and blog
1 parent 6811f66 commit 80f6df9

22 files changed

Lines changed: 1723 additions & 12456 deletions

.github/workflows/deploy-aurora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- uses: actions/setup-node@v4
2424
with:
25-
node-version: 20
25+
node-version: 22
2626
cache: npm
2727

2828
- run: npm ci

.github/workflows/deploy-blog.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Builds the blog (a sub-project in blog/) and publishes it to the gh-pages
1+
# Builds the blog (an Astro root in blog/) and publishes it to the gh-pages
22
# branch of luminusOS/blog, which serves blog.luminusos.org via GitHub Pages
33
# (one Pages site per repo). Requires the BLOG_DEPLOY_TOKEN secret: a
44
# fine-grained PAT with "Contents: write" on luminusOS/blog.
@@ -8,26 +8,27 @@ name: Deploy blog site
88
on:
99
push:
1010
branches: [main]
11-
paths: ['blog/**']
11+
paths:
12+
- 'blog/**'
13+
- 'package.json'
14+
- 'package-lock.json'
15+
- 'scripts/**'
1216
workflow_dispatch:
1317

1418
jobs:
1519
build-and-deploy:
1620
runs-on: ubuntu-latest
17-
defaults:
18-
run:
19-
working-directory: blog
2021
steps:
2122
- uses: actions/checkout@v4
2223

2324
- uses: actions/setup-node@v4
2425
with:
25-
node-version: 20
26+
node-version: 22
2627
cache: npm
27-
cache-dependency-path: blog/package-lock.json
28+
cache-dependency-path: package-lock.json
2829

2930
- run: npm ci
30-
- run: npm run build
31+
- run: npm run build:blog
3132

3233
- uses: peaceiris/actions-gh-pages@v4
3334
with:

.github/workflows/deploy-wiki.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Builds the wiki (a sub-project in wiki/) and publishes it to the gh-pages
1+
# Builds the wiki (an Astro root in wiki/) and publishes it to the gh-pages
22
# branch of luminusOS/wiki, which serves wiki.luminusos.org via GitHub Pages
33
# (one Pages site per repo). Requires the WIKI_DEPLOY_TOKEN secret: a
44
# fine-grained PAT with "Contents: write" on luminusOS/wiki.
@@ -8,26 +8,27 @@ name: Deploy wiki site
88
on:
99
push:
1010
branches: [main]
11-
paths: ['wiki/**']
11+
paths:
12+
- 'wiki/**'
13+
- 'package.json'
14+
- 'package-lock.json'
15+
- 'scripts/**'
1216
workflow_dispatch:
1317

1418
jobs:
1519
build-and-deploy:
1620
runs-on: ubuntu-latest
17-
defaults:
18-
run:
19-
working-directory: wiki
2021
steps:
2122
- uses: actions/checkout@v4
2223

2324
- uses: actions/setup-node@v4
2425
with:
25-
node-version: 20
26+
node-version: 22
2627
cache: npm
27-
cache-dependency-path: wiki/package-lock.json
28+
cache-dependency-path: package-lock.json
2829

2930
- run: npm ci
30-
- run: npm run build
31+
- run: npm run build:wiki
3132

3233
- uses: peaceiris/actions-gh-pages@v4
3334
with:

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Every page exists in English (default) and Brazilian Portuguese:
1717
| --- | --- |
1818
| `/` and `/pt-br/` | LuminusOS home: hero, pillars, how it works, editions, download, support |
1919
| `/aurora/` and `/pt-br/aurora/` | Aurora Shell subpage |
20+
| `/blog/` | Blog copy embedded in the main website build |
21+
| `/wiki/` | Wiki copy embedded in the main website build |
2022

2123
All copy lives in a single typed dictionary: `src/i18n/translations.ts`.
2224
Adding a language = append it to the `languages` array (name + flag, the
@@ -30,8 +32,8 @@ preference, with a header toggle persisted in `localStorage`.
3032

3133
```sh
3234
npm install
33-
npm run dev # http://localhost:4321
34-
npm run build # static output in dist/
35+
npm run dev # http://localhost:4321, including /aurora, /blog and /wiki
36+
npm run build # static output in dist/, including /blog and /wiki
3537
npm run preview # serve dist/ locally
3638
```
3739

@@ -50,34 +52,33 @@ by editing the `available` check when its first release lands.
5052

5153
```sh
5254
npm run build:aurora # static output in dist-aurora/
55+
npm run deploy:aurora # deploy dist-aurora to Cloudflare Pages
5356
```
5457

5558
With `SITE_VARIANT=aurora` the Aurora Shell page becomes the site root
5659
(`/` and `/pt-br/`), cross-links point back to `https://luminusos.org`, and
5760
`dist-aurora/CNAME` is written as `aurora.luminusos.org`.
5861

59-
`deploy-aurora.yml` pushes that build to the `gh-pages` branch of
60-
`luminusOS/aurora-shell` (needs the `AURORA_DEPLOY_TOKEN` secret: a
61-
fine-grained PAT with Contents: write there), since GitHub Pages serves one
62-
site per repository.
63-
6462
## Wiki & Blog (sub-projects)
6563

66-
The wiki and the blog live in this repository as independent Astro projects:
64+
The wiki and the blog live in this repository as Astro roots that share the
65+
top-level `package.json` and lockfile:
6766

6867
| Site | Folder | Stack |
6968
| --- | --- | --- |
7069
| [wiki.luminusos.org](https://wiki.luminusos.org) | `wiki/` | Astro Starlight (sidebar, search, i18n) |
7170
| [blog.luminusos.org](https://blog.luminusos.org) | `blog/` | Astro content collections, English + Google Translate menu |
7271

73-
Each has its own `package.json` (`cd wiki && npm install && npm run dev`).
74-
GitHub Pages serves one site per repository, so `deploy-wiki.yml` and
75-
`deploy-blog.yml` build the sub-project and push its `dist/` to the
76-
`gh-pages` branch of `luminusOS/wiki` / `luminusOS/blog` (Pages-only repos).
77-
Setup per subdomain: create the target repo, enable Pages on `gh-pages`,
78-
point DNS `<sub>.luminusos.org``luminusos.github.io`, and add the
79-
`WIKI_DEPLOY_TOKEN` / `BLOG_DEPLOY_TOKEN` secret here (fine-grained PAT
80-
with Contents: write on the target repo).
72+
The root `npm run build` builds both projects with `/blog` and `/wiki` bases
73+
and copies them into the main website `dist/`. Standalone Cloudflare Pages
74+
builds use the subdomain versions:
75+
76+
```sh
77+
npm run build:blog
78+
npm run deploy:blog
79+
npm run build:wiki
80+
npm run deploy:wiki
81+
```
8182

8283
## License
8384

blog/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ The file name becomes the URL: `my-post.md` → `/posts/my-post/`.
2929

3030
```sh
3131
npm install
32-
npm run dev # http://localhost:4321
33-
npm run build # static output in dist/
32+
npm run dev # from the repository root, served at /blog
33+
npm run build:blog # static output in blog/dist/
3434
```
3535

3636
## Deployment

blog/astro.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
33

4+
const base = process.env.SITE_BASE ?? '';
5+
const site = process.env.SITE_URL ?? 'https://blog.luminusos.org';
6+
47
export default defineConfig({
5-
site: 'https://blog.luminusos.org',
8+
site,
9+
base,
610
trailingSlash: 'ignore',
711
});

0 commit comments

Comments
 (0)