Skip to content

Commit 69b1716

Browse files
authored
Update build.yml
1 parent 91715c3 commit 69b1716

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build and deploy
22

33
on:
44
push:
5+
branches:
6+
- 'main'
57
paths:
68
- ".github/**"
79
- ".vitepress/**"
@@ -83,10 +85,11 @@ jobs:
8385
run: |
8486
sed -e "s/BUILD_TIME/$(TZ=Asia/Shanghai date -Isecond)/" -e "s/COMMIT_SHA/${{ github.sha }}/" -i src/about.md
8587
npm run build
86-
- name: Upload artifact
87-
uses: actions/upload-pages-artifact@v3
88+
- name: Publish to Cloudflare Pages
89+
uses: cloudflare/pages-action@v1
8890
with:
89-
path: ".vitepress/dist/"
90-
- name: Deploy to GitHub Pages
91-
id: deployment
92-
uses: actions/deploy-pages@v4
91+
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
92+
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
93+
projectName: proskynova-github-io
94+
directory: .vitepress/dist
95+
wranglerVersion: '3'

0 commit comments

Comments
 (0)