Skip to content

Commit

Permalink
ci: fix ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitkolhe committed Sep 28, 2024
1 parent 69b3867 commit b3a3bef
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to Production

on:
push:
tags:
- '*'

jobs:
deploy:
name: Run tests and deploy to production
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Cache Dependencies
uses: actions/cache@v4.0.2
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: ${{ runner.os }}-bun-

- name: Setup Bun
uses: oven-sh/setup-bun@v1.2.0
- run: bun install

- name: Run Tests
run: bun run test

- name: Deploy to Production
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"lint:fix": "bun run lint --fix",
"test": "vitest run",
"test:ui": "vitest --ui",
"deploy": "vercel deploy --prod",
"deploy": "wrangler deploy",
"release": "bun run test && bun run changelogen --release --push",
"postinstall": "npx simple-git-hooks"
},
Expand Down Expand Up @@ -67,6 +67,7 @@
"simple-git-hooks": "^2.11.1",
"tsc-alias": "^1.8.10",
"typescript": "^5.6.2",
"vitest": "^2.1.1"
"vitest": "^2.1.1",
"wrangler": "^3.78.12"
}
}

0 comments on commit b3a3bef

Please sign in to comment.