-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.09 KB
/
publish.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
name: deploy to cloudflare workers
on:
push:
branches:
- main
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: github release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GH_TOKEN }}
publish:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- id: node-modules-cache
uses: actions/cache@v3
with:
path: |
node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
restore-keys: node-modules-
- name: cloudflare workers publish
uses: cloudflare/wrangler-action@2.0.0
with:
accountId: ${{ secrets.CF_ACCOUNT_ID }}
apiToken: ${{ secrets.CF_API_TOKEN }}
secrets: |
SECRET_TELEGRAM_API_TOKEN
env:
SECRET_TELEGRAM_API_TOKEN: ${{ secrets.SECRET_TELEGRAM_API_TOKEN }}