Skip to content

Commit 6c96545

Browse files
docs: Deploy new site alongside old one (#5360)
Co-authored-by: Josh Goldberg ✨ <[email protected]>
1 parent 8878f22 commit 6c96545

File tree

7 files changed

+341
-14
lines changed

7 files changed

+341
-14
lines changed

.github/workflows/nightly-site-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Deploy `mochajs.org` branch nightly by hitting a netlify build URL.
22
# This updates the list of supporters
3+
# It uses commands from netlify.toml at root of repo
34

45
name: Nightly mochajs.org Deploy
56

docs-next/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,19 @@ npm i
77
npm run generate
88
npm run dev
99
```
10+
11+
To merge with the old site:
12+
13+
```shell
14+
npm i
15+
npm run build-with-old
16+
```
17+
18+
To preview the old and new site:
19+
20+
```shell
21+
cd .. # back to root dir
22+
npm run docs:preview
23+
```
24+
25+
The new site will be at `http://localhost:8080/next`

docs-next/astro.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import { defineConfig } from "astro/config";
22
import starlight from "@astrojs/starlight";
33

44
export default defineConfig({
5-
// For now, this is only being deployed to mocha-docs-next.netlify.app.
6-
// Soon we'll move it onto mochajs.org/next.
7-
...(!process.env.NETLIFY_BUILD_BASE && { base: "/next" }),
5+
base: "/next",
86
integrations: [
97
starlight({
108
components: {

docs-next/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"docs": "cd .. && npm i && cd docs-next && npm run generate && npm run build",
1010
"build": "astro check && astro build",
1111
"preview": "astro preview",
12+
"build-with-old": "npm run generate && npm run build -- --outDir ../docs/_site/next",
1213
"astro": "astro"
1314
},
1415
"dependencies": {

netlify.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515
[build.environment]
1616
DEBUG = "mocha:docs*"
17-
NODE_VERSION = "16"
18-
RUBY_VERSION = "2.7.2"
17+
NODE_VERSION = "20" # LTS until 2026-04-30
1918

2019
[context.deploy-preview]
2120
command = "npm run docs"

0 commit comments

Comments
 (0)