Skip to content

Commit fae1f66

Browse files
committed
feat: add GitHub Actions workflow for deployment
- Introduced a new deploy.yaml file to automate deployment processes for both API and web applications. - Configured steps to set up Bun, check out the repository, and deploy using Cloudflare Wrangler. - Included build step for the web app to ensure the latest version is deployed.
1 parent dffc730 commit fae1f66

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 60
10+
steps:
11+
- uses: oven-sh/setup-bun@v2
12+
with:
13+
bun-version: 1.2.7
14+
- uses: actions/checkout@v4
15+
- name: Deploy API
16+
uses: cloudflare/wrangler-action@v3
17+
with:
18+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
19+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
20+
workingDirectory: apps/api
21+
packageManager: bun
22+
- name: Build
23+
run: bun install && cd apps/web-app && bun run build
24+
- name: Deploy Web App
25+
uses: cloudflare/wrangler-action@v3
26+
with:
27+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
28+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
29+
command: pages deploy dist --project-name=asyncstatus
30+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
31+
workingDirectory: apps/web-app

0 commit comments

Comments
 (0)