-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.05 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
name: "Test and Deploy Worker"
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
node-version: [ 20 ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/run-tests
with:
node-version: ${{ matrix.node-version }}
# # Install Node
# - name: Setup Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "npm"
# - name: Confirm installed Node version
# run: node -v
# - name: Install dependencies
# run: npm ci
# - name: Run tests
# run: npm run test
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: test
steps:
- uses: actions/checkout@v4
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}