-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.51 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
on: [push]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies with pnpm
run: pnpm i
- name: Build
run: pnpm build
# Run a build step here if your project requires
- name: Cloudflare Pages GitHub Action
uses: cloudflare/pages-action@v1.5.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: gameevent-frontend
directory: ./
# Optional: Enable this if you want to have GitHub Deployments triggered
# 该token每个工作流作业开始时,GitHub 会自动创建唯一的 GITHUB_TOKEN 机密以在工作流中使用,直接使用无需额外设置机密变量
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: main
# Optional: Change the working directory
workingDirectory: ./dist
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: "3"