Skip to content

Commit 423c07f

Browse files
committed
chore: migrate website toolchain from npm/node to bun
1 parent bb61781 commit 423c07f

7 files changed

Lines changed: 2627 additions & 16143 deletions

File tree

.github/workflows/gh_pages_deploy.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,28 @@ jobs:
1111

1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515

16-
- name: Set up Node.js
17-
uses: actions/setup-node@v2
16+
- name: Set up Bun
17+
uses: oven-sh/setup-bun@v2
1818
with:
19-
node-version: "lts/krypton"
19+
bun-version: "1.3.14"
2020

21-
- name: Navigate to website folder
22-
working-directory: ./website
23-
run: echo "Now in the website directory."
21+
- name: Cache Bun dependencies
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.bun/install/cache
25+
key: ${{ runner.os }}-bun-${{ hashFiles('website/bun.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-bun-
2428
2529
- name: Install dependencies
2630
working-directory: ./website
27-
run: npm install
31+
run: bun install --frozen-lockfile
2832

2933
- name: Build Docusaurus
3034
working-directory: ./website
31-
run: npm run build
35+
run: bun run build
3236

3337
- name: Deploy to GitHub Pages
3438
uses: peaceiris/actions-gh-pages@v3

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,13 @@
3232
*.app
3333

3434
# VsCode
35-
.vscode/
35+
.vscode/
36+
37+
# Docusaurus
38+
/website/node_modules
39+
/website/build
40+
/website/.docusaurus
41+
bun-error.log
42+
43+
# Local files
44+
*.local.*

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bun 1.3.14

website/README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,32 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
44

55
## Quick Start
66

7-
First, ensure you're using the correct Node.js version:
7+
First, ensure you're using the correct Bun version:
88

99
```bash
10-
nvm install
11-
nvm use
10+
asdf install
11+
# or
12+
mise install
1213
```
1314

1415
### Installation
1516

16-
```
17-
npm install
17+
```bash
18+
bun install
1819
```
1920

2021
### Local Development
2122

22-
```
23-
npm start
23+
```bash
24+
bun run start
2425
```
2526

2627
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
2728

2829
### Build
2930

30-
```
31-
npm run build
31+
```bash
32+
bun run build
3233
```
3334

3435
This command generates static content into the `build` directory and can be served using any static contents hosting service.
@@ -37,14 +38,14 @@ This command generates static content into the `build` directory and can be serv
3738

3839
Using SSH:
3940

40-
```
41-
USE_SSH=true npm run deploy
41+
```bash
42+
USE_SSH=true bun run deploy
4243
```
4344

4445
Not using SSH:
4546

46-
```
47-
GIT_USER=<Your GitHub username> npm run deploy
47+
```bash
48+
GIT_USER=<Your GitHub username> bun run deploy
4849
```
4950

5051
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

website/bun.lock

Lines changed: 2580 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)