Skip to content

Commit 7ff69c3

Browse files
authored
Fix bun token (#3727)
1 parent 6142d6b commit 7ff69c3

File tree

8 files changed

+9
-10
lines changed

8 files changed

+9
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
env:
8-
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
8+
BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }}
99
jobs:
1010
format:
1111
runs-on: ubuntu-latest
@@ -41,7 +41,7 @@ jobs:
4141
name: Build (Open Source)
4242
timeout-minutes: 6
4343
env:
44-
NPM_TOKEN_READONLY: ''
44+
BUN_NPM_TOKEN: ''
4545
steps:
4646
- name: Checkout
4747
uses: actions/checkout@v4

.github/workflows/deploy-preview.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
env:
8-
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
8+
BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }}
99
jobs:
1010
deploy-v2-vercel:
1111
name: Deploy v2 to Vercel (preview)

.github/workflows/deploy-production.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- main
66
env:
7-
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
7+
BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }}
88
jobs:
99
deploy-v2-vercel:
1010
name: Deploy v2 to Vercel (production)

.github/workflows/deploy-staging.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- main
66
env:
7-
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
7+
BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }}
88
jobs:
99
deploy-v2-vercel:
1010
name: Deploy v2 to Vercel (staging)

.github/workflows/publish.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77

88
env:
9-
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
9+
BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1010

1111
concurrency: ${{ github.workflow }}-${{ github.ref }}
1212

@@ -22,8 +22,6 @@ jobs:
2222
fetch-depth: 0
2323
- name: Setup Bun
2424
uses: ./.github/composite/setup-bun
25-
- name: Setup npmrc
26-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
2725
- name: Install dependencies
2826
run: bun install --frozen-lockfile
2927
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ yarn-error.log*
2525

2626
# TypeScript
2727
*.tsbuildinfo
28+
.npmrc

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ If you are GitBook staff, you'll need our NPM token in your local environment.
9090
```
9191
.env.local
9292
93-
NPM_TOKEN_READONLY=xxx
93+
BUN_NPM_TOKEN=xxx
9494
```
9595

9696
and then reinstall dependencies.

bunfig.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[install.scopes]
2-
"gitbook" = { token = "$NPM_TOKEN_READONLY", url = "https://registry.npmjs.org" }
2+
"gitbook" = { token = "$BUN_NPM_TOKEN", url = "https://registry.npmjs.org" }

0 commit comments

Comments
 (0)