File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : deploy to cloudflare workers
2+ on :
3+ push :
4+ branches :
5+ - master
6+
7+ jobs :
8+ release :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-node@v4
13+ with :
14+ node-version : ' latest'
15+ - name : github release
16+ if : startsWith(github.ref, 'refs/tags/')
17+ uses : softprops/action-gh-release@v1
18+ with :
19+ token : ${{ secrets.GH_TOKEN }}
20+ publish :
21+ runs-on : ubuntu-latest
22+ timeout-minutes : 5
23+ steps :
24+ - uses : actions/checkout@v4
25+ - uses : actions/setup-node@v4
26+ with :
27+ node-version : ' latest'
28+ - id : node-modules-cache
29+ uses : actions/cache@v4
30+ with :
31+ path : |
32+ node_modules
33+ key : node-modules-${{ hashFiles('package-lock.json') }}
34+ restore-keys : node-modules-
35+ - name : cloudflare workers publish
36+ uses : cloudflare/wrangler-action@v3
37+ with :
38+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
39+ preCommands : |
40+ [ -z "$SECRET_TELEGRAM_API_TOKEN" ] && echo "Secret SECRET_TELEGRAM_API_TOKEN not set, creating dummy one..." && SECRET_TELEGRAM_API_TOKEN="default-gh-action-secret" || true
41+ secrets : |
42+ SECRET_TELEGRAM_API_TOKEN
43+ env :
44+ SECRET_TELEGRAM_API_TOKEN : ${{ secrets.SECRET_TELEGRAM_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments