Skip to content

Commit cdc3e5b

Browse files
committed
ci: deploy to worker
1 parent 33486c8 commit cdc3e5b

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/deploy.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy Production
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
name: Deploy
11+
permissions:
12+
pull-requests: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: 10
18+
- name: Install Dependencies
19+
run: pnpm install
20+
- name: Build
21+
run: pnpm build
22+
- name: Deploy
23+
id: deploy
24+
uses: cloudflare/wrangler-action@v3
25+
with:
26+
packageManager: pnpm
27+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
28+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
29+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
30+
command: deploy --assets ./dist --name compio-website-2 --latest --domain ww2.compio.rs

.github/workflows/preview.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ jobs:
2020
id: deploy
2121
uses: cloudflare/wrangler-action@v3
2222
with:
23+
wranglerVersion: 4.65.0
2324
packageManager: pnpm
2425
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
2526
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
2627
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
27-
command: pages deploy ./dist --project-name=compio-website
28+
command: versions upload --assets ./dist --name compio-website-2 --latest
2829
- name: Comment PR
2930
uses: thollander/actions-comment-pull-request@v3
3031
with:

0 commit comments

Comments
 (0)