-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.39 KB
/
workflow.yml
File metadata and controls
61 lines (51 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Deploy HowOldAreMyCats to Cloudflare Pages
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pull-requests: write
issues: write
jobs:
deploy-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
deployments: write
issues: write
repository-projects: write
name: Deploy HowOldAreMyCats to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Verify Node installation
run: |
which node
which npm
node --version
npm --version
- name: Install Wrangler
run: npm install -g wrangler
- name: Install & Build
run: |
npm install
npm run build
working-directory: .
- name: Verify Wrangler Config
run: cat wrangler.toml
- name: Add Wrangler Config to Build
run: cp wrangler.toml ./build
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./build --project-name=howoldaremycats
gitHubToken: ${{ secrets.GITHUB_TOKEN }}