Skip to content

Commit d2fd94a

Browse files
authored
Add pages preview
1 parent b569775 commit d2fd94a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/node.js.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3-
41
name: Node.js CI
52

63
on:
74
push:
8-
branches: ["main"]
9-
env:
10-
VITE_GITHUB_AUTH_TOKEN: ${{ secrets.VITE_GITHUB_AUTH_TOKEN }}
11-
VITE_GITHUB_ORG: SlimeVR
125

136
jobs:
147
build:
158
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
deployments: write
1612

1713
steps:
1814
- uses: actions/checkout@v4
@@ -24,8 +20,13 @@ jobs:
2420
cache: "pnpm"
2521
- run: pnpm i
2622
- run: NITRO_PRESET=cloudflare_pages_static pnpm build
23+
env:
24+
VITE_GITHUB_AUTH_TOKEN: ${{ secrets.VITE_GITHUB_AUTH_TOKEN }}
25+
VITE_GITHUB_ORG: SlimeVR
2726
- name: Deploy
2827
uses: cloudflare/wrangler-action@v3
2928
with:
3029
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
31-
command: pages deploy dist/ --project-name "slimevr-main-website" --branch "main"
30+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
31+
command: pages deploy dist/ --project-name "slimevr-main-website"
32+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)