-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 827 Bytes
/
ci.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
name: Check and deploy
on:
- push
- pull_request
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run lint
working-directory: ./packages/web
deploy:
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
working-directory: ./packages/web
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy packages/web/dist --project-name=${{ secrets.CF_PROJECT_NAME }} --branch=main