Skip to content

Commit a76cd22

Browse files
committed
ci: upload to cloudflare pages
1 parent 77b1bfb commit a76cd22

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,26 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
with:
16-
persist-credentials: false
17-
- uses: pnpm/action-setup@v4
18-
name: Install pnpm
19-
with:
20-
run_install: false
21-
- name: Use Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version-file: '.node-version'
25-
cache: 'pnpm'
26-
- run: pnpm i
27-
- run: pnpm run build
28-
- run: cp -r src/img dist/img
29-
- name: Deploy
30-
uses: peaceiris/actions-gh-pages@v3
31-
with:
32-
personal_token: ${{ secrets.ACCESS_TOKEN }}
33-
publish_branch: gh-pages
34-
publish_dir: ./dist
35-
user_name: ${{ secrets.GIT_USERNAME }}
36-
user_email: ${{ secrets.GIT_EMAIL }}
37-
cname: friends.skk.moe
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
17+
- uses: pnpm/action-setup@v4
18+
name: Install pnpm
19+
with:
20+
run_install: false
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version-file: ".node-version"
25+
cache: "pnpm"
26+
- run: pnpm i
27+
- run: pnpm run build
28+
- run: cp -r src/img dist/img
29+
- name: Deploy to Cloudflare Pages
30+
uses: cloudflare/wrangler-action@v3
31+
with:
32+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
34+
command: pages deploy dist --project-name=sukka-friends --commit-dirty=true --branch=main
35+
wranglerVersion: latest

0 commit comments

Comments
 (0)