-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.49 KB
/
cli-install-deploy.yml
File metadata and controls
58 lines (48 loc) · 1.49 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
name: CLI install Worker deploy
# Deploy install/cli-install Worker (matches platform-next pattern: CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN).
#
# Secrets (repository): CLOUDFLARE_API_TOKEN — API token with Workers Scripts Edit (same as platform-next).
on:
workflow_dispatch:
# push:
# branches:
# - main
# paths:
# - "install/**"
# - ".github/workflows/cli-install-deploy.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
# CLOUDFLARE_ACCOUNT_ID: <POPULATE>
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: install
steps:
- uses: actions/checkout@v6
with:
show-progress: false
- uses: actions/setup-node@v6
with:
node-version: "24.x"
cache: npm
cache-dependency-path: install/package-lock.json
- name: Verify Cloudflare API token
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
curl -sS -X GET "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/tokens/verify" \
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
-H "Content-Type: application/json"
- name: Install & deploy Worker
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npm ci
npm run deploy