Skip to content

Commit 3b9fbd1

Browse files
committed
chore: add deploy action
1 parent ccbe35b commit 3b9fbd1

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on: [push]
2+
3+
jobs:
4+
deploy:
5+
runs-on: ubuntu-latest
6+
permissions:
7+
contents: read
8+
deployments: write
9+
10+
name: Deploy to Cloudflare Pages
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 22
17+
registry-url: https://registry.npmjs.org/
18+
- run: npm ci
19+
- run: npm run build:docs
20+
- name: Deploy
21+
uses: cloudflare/wrangler-action@v3
22+
with:
23+
workingDirectory: site
24+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
25+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
26+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
27+
command: pages deploy public --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ coverage
3030
*.tsbuildinfo
3131

3232
site/public
33+
site/.wrangler
3334
# vitepress
3435
.vitepress/cache

0 commit comments

Comments
 (0)