-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 1.52 KB
/
deploy.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
name: Deploy to production
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/deploy.yml"
- "wrangler.toml"
- "src/**/**.rs"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
jobs:
check:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: checks
run: |
cargo fmt --all --check
deploy:
needs: [check]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install worker-build
run: |
cargo install worker-build
- name: Deploy
uses: cloudflare/wrangler-action@v3
env:
ENDPOINT: ${{ secrets.ENDPOINT }}
GOOGLE_APIKEY: ${{ secrets.GOOGLE_APIKEY }}
GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }}
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
BOT_CHANNEL_ID: ${{ secrets.BOT_CHANNEL_ID }}
ROLES: ${{ secrets.ROLES }}
BOT_APIKEY: ${{ secrets.BOT_APIKEY }}
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
ENDPOINT
BOT_APIKEY
GOOGLE_APIKEY
GOOGLE_CALENDAR_ID
CHANNEL_ID
BOT_CHANNEL_ID
ROLES