-
-
Notifications
You must be signed in to change notification settings - Fork 71
79 lines (70 loc) · 2.26 KB
/
cd-app-prod.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CD - Production
on:
push:
branches:
- main
jobs:
publish-app-prod:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish app to production
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
corepack: true
cache: 'pnpm'
- name: Install dependencies
run: pnpm i
- name: Build the app
run: pnpm -F @enclosed/deploy-cloudflare build
- name: Publish to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: enclosed
workingDirectory: packages/deploy-cloudflare
directory: dist
deploymentName: Production App
branch: main
wranglerVersion: '3'
publish-docs-prod:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish docs to production
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
corepack: true
cache: 'pnpm'
- name: Install dependencies
run: pnpm i
- name: Build the docs
run: pnpm -F @enclosed/docs build
env:
VITE_IS_PLAUSIBLE_ENABLED: ${{ secrets.DOCS_IS_PLAUSIBLE_ENABLED }}
VITE_PLAUSIBLE_DOMAIN: ${{ secrets.DOCS_PLAUSIBLE_DOMAIN }}
VITE_PLAUSIBLE_SCRIPT_SRC: ${{ secrets.DOCS_PLAUSIBLE_SCRIPT_SRC }}
- name: Publish to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: enclosed-docs
workingDirectory: packages/docs
directory: dist
deploymentName: Production Docs
branch: main
wranglerVersion: '3'