-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (29 loc) · 1.03 KB
/
deploy.yml
File metadata and controls
29 lines (29 loc) · 1.03 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
name: Deploy Worker
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
command: deploy --outdir dist --upload-source-maps --var SENTRY_RELEASE:${{ github.sha }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Install Sentry CLI
run: curl -sL https://sentry.io/get-cli/ | sh
- name: Upload sourcemaps to Sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE: ${{ github.sha }}
run: sentry-cli releases new $SENTRY_RELEASE --org=nn1dev --project=api && sentry-cli sourcemaps upload --org=nn1dev --project=api --release=$SENTRY_RELEASE --strip-prefix 'dist/..' dist