-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.58 KB
/
deploy-cloudflare-workers.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
name: Deploy Cloudflare Workers
on:
workflow_run:
workflows: ['CI']
types: [completed]
branches: [main]
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
GITHUB_SHA: ${{ github.sha }}
TURBO_TOKEN: ${{ secrets.TURBOREPO_REMOTE_CACHE_AUTH_SECRET }}
TURBO_API: 'https://turbo-cache.adishwar-rishi.com'
TURBO_TEAM: 'team_arishi_monorepo'
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBOREPO_REMOTE_CACHE_SIGNATURE_KEY }}
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
check:
name: Build and deploy CF Workers
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
- name: Deploy domain-redirect worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy --minify
workingDirectory: 'cf-workers/domain-redirect'
packageManager: 'pnpm'
- name: Deploy arishi-website-api worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy --minify
workingDirectory: 'cf-workers/website-api'
packageManager: 'pnpm'