-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.25 KB
/
Copy pathdeploy-production.yml
File metadata and controls
49 lines (42 loc) · 1.25 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
name: Deploy (production)
on:
workflow_dispatch:
inputs:
ref:
description: 'Git ref (branch, tag, or SHA) to deploy'
default: main
concurrency:
group: cf-worker-production
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.ref }}
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: 📥 Install deps
run: pnpm i --frozen-lockfile
- name: 🏗️ Build (inject production vars)
env:
SITE_URL: ${{ vars.SITE_URL }}
ENV_NAME: production
PUBLIC_UMAMI_SITE_ID: ${{ vars.PUBLIC_UMAMI_SITE_ID }}
PUBLIC_UMAMI_SHARE_URL: ${{ vars.PUBLIC_UMAMI_SHARE_URL}}
GH_API_TOKEN: ${{ vars.GH_API_TOKEN }}
run: pnpm build
- name: 🚀 Deploy with Wrangler
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy --env production