-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (64 loc) · 1.96 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
55
56
57
58
59
60
61
62
63
64
65
66
name: Deploy cloudflare-workers to Workers
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudflare-workers
steps:
- uses: actions/checkout@v4
name: Checkout Repo
- uses: actions/setup-node@v4
name: Set Node.js 20.x
with:
node-version: 20.x
- uses: borales/actions-yarn@v5
name: Run install
with:
cmd: install
dir: cloudflare-workers
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
workingDirectory: "cloudflare-workers"
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
secrets: |
ADMINISTRATOR_SECRET
TELEGRAM_BOT_TOKEN
TELEGRAM_CHAT_ID
GITHUB_APP_CLIENT_ID
GITHUB_APP_CLIENT_SECRET
OAUTH_JWT_SECRET
GITHUB_ORG_ADMINISTRATOR_TEAM
preCommands: |
wrangler d1 execute comments --yes --file=schema.sql
env:
ADMINISTRATOR_SECRET: ${{ secrets.ADMINISTRATOR_SECRET }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
GITHUB_APP_CLIENT_ID: ${{ secrets.GH_APP_CLIENT_ID }}
GITHUB_APP_CLIENT_SECRET: ${{ secrets.GH_APP_CLIENT_SECRET }}
OAUTH_JWT_SECRET: ${{ secrets.OAUTH_JWT_SECRET }}
GITHUB_ORG_ADMINISTRATOR_TEAM: ${{ secrets.GH_ORG_ADMINISTRATOR_TEAM }}
upload-artifacts:
name: Upload Artifacts
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudflare-workers
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
name: Checkout Repo
- uses: actions/upload-artifact@v2
with:
name: cloudflare-workers
path: cloudflare-workers