Skip to content

Commit 65f06be

Browse files
committed
ci: update deployment workflow
1 parent 86247a4 commit 65f06be

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

.github/workflows/main.yml

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI
42

5-
# Controls when the action will run.
63
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
8-
push:
9-
branches: [ main ]
10-
pull_request:
11-
branches: [ main ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
14-
workflow_dispatch:
15-
repository_dispatch:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
repository_dispatch:
1610

17-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1811
jobs:
19-
# This workflow contains a single job called "build"
20-
build:
21-
# The type of runner that the job will run on
22-
runs-on: ubuntu-latest
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
2315

24-
# Steps represent a sequence of tasks that will be executed as part of the job
25-
steps:
26-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27-
- uses: actions/checkout@v4
28-
- name: Install Dependencies
29-
run: npm install
30-
- name: Deploy to Cloudflare Workers with Wrangler
31-
uses: cloudflare/wrangler-action@v3
32-
with:
33-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
34-
command: deploy
35-
env:
36-
CLOUDFLARE_ACCOUNT_ID: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
16+
- uses: actions/checkout@v4
17+
18+
- name: Install Dependencies
19+
run: npm install
20+
21+
- name: Deploy to Cloudflare Workers with Wrangler
22+
uses: cloudflare/wrangler-action@v3
23+
with:
24+
gitHubToken: ${{ secrets.SELF_TOKEN_CL }}
25+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
26+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
27+
command: deploy
28+
env:
29+
CLOUDFLARE_ACCOUNT_ID: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}

0 commit comments

Comments
 (0)