Skip to content

Commit 5696317

Browse files
author
Hanlin Wu
committed
ci: add GitHub Actions deployment workflow
1 parent c30e4d6 commit 5696317

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
deployments: write
15+
name: Build and Deploy
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Deploy to Cloudflare Pages
33+
uses: cloudflare/wrangler-action@v3
34+
with:
35+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
36+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
37+
command: pages deploy dist --project-name=logicmap

0 commit comments

Comments
 (0)