-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.31 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
name: Deploy
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Create wrangler.toml
uses: bluwy/substitute-string-action@v3
with:
_input-file: 'wrangler.example.toml'
_output-file: 'wrangler.toml'
_format-key: '%%key%%'
LOGS: ${{ secrets.LOGS }}
SETTINGS: ${{ secrets.SETTINGS }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install
run: npm ci
- name: Build
run: npm run-script build
- name: Deploy
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
secrets: |
HOOK_PATH
TELEGRAM_API_TOKEN
env:
HOOK_PATH: ${{ secrets.HOOK_PATH }}
TELEGRAM_API_TOKEN: ${{ secrets.TELEGRAM_API_TOKEN }}
command: deploy
- name: Check status
uses: srt32/uptime@master
with:
url-to-hit: ${{ steps.deploy.outputs.deployment-url }}/status