Skip to content

Commit b446c2a

Browse files
committed
ci: add GitHub Actions workflow for CI checks and Dokploy deploy
Runs typecheck and lint on pushes to develop/main and PRs to main. Deploy job triggers Dokploy webhook only on main, gated behind passing checks.
1 parent a5186b9 commit b446c2a

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: oven-sh/setup-bun@v2
17+
with:
18+
bun-version: latest
19+
20+
- run: bun install --frozen-lockfile
21+
22+
- name: Typecheck
23+
run: bun typecheck
24+
25+
- name: Lint
26+
run: bun lint
27+
28+
deploy:
29+
if: github.ref == 'refs/heads/main'
30+
needs: check
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- name: Trigger Dokploy deploy
35+
run: |
36+
status=$(curl -s -o /dev/null -w "%{http_code}" \
37+
-X POST "${{ secrets.DOKPLOY_DEPLOY_WEBHOOK }}")
38+
echo "Webhook responded: $status"
39+
[ "$status" -ge 200 ] && [ "$status" -lt 300 ]

0 commit comments

Comments
 (0)