Skip to content

Commit e2c4726

Browse files
ci: add Cloudflare Pages deploy workflow
1 parent 4e07e39 commit e2c4726

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build-deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: "pnpm"
22+
23+
- name: Enable corepack & setup pnpm
24+
run: |
25+
corepack enable
26+
corepack prepare pnpm@latest --activate
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Build site
32+
run: pnpm build
33+
34+
- name: Publish to Cloudflare Pages
35+
uses: cloudflare/pages-action@v1
36+
with:
37+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
38+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
39+
projectName: intelligent-terminal
40+
directory: dist

0 commit comments

Comments
 (0)