-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.65 KB
/
cf-pages.yml
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
on:
push:
paths:
- 'apps/web/**'
- '.github/workflows/cf-pages.yml'
name: Deploy to Cloudflare Pages
jobs:
deploy:
defaults:
run:
shell: bash
working-directory: ./apps/web
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- uses: actions/setup-node@v3
with:
node-version: 18.3
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build:mapped
- name: Sentry Remix sourcemap upload
run: node ./node_modules/@sentry/remix/scripts/sentry-upload-sourcemaps.js && find . -type f -name '*.map' -delete
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT_WEB }}
- name: Publish to Cloudflare Pages
id: cf-deploy
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: frugal
directory: ./public
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
workingDirectory: ./apps/web
sentry:
name: Create Sentry release
uses: dougley/frugal/.github/workflows/sentry.yml@main
needs: deploy
secrets: inherit
with:
environment: ${{ github.ref_name == 'main' && 'production' || 'development' }}
project: web