Files
dimkk 7d398ad093
All checks were successful
Bun CI/CD / test (push) Successful in 9s
Bun CI/CD / deploy-staging (push) Successful in 1s
Bun CI/CD / deploy-prod (push) Has been skipped
chore: fix colify curl in action
2026-01-03 20:04:34 +03:00

48 lines
1.3 KiB
YAML

# .gitea/workflows/deploy.yml
name: Bun CI/CD
on:
push:
branches: [main, staging]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🛠️ Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest # Or specify a version like "1.3.3"
- run: bun ci
- run: bun test
# Preview - handled automatically by Coolify!
# No action needed here
deploy-staging:
needs: test
if: github.ref == 'refs/heads/staging'
runs-on: ubuntu-latest
steps:
- name: Trigger Coolify Staging Deploy
run: |
curl -X POST \
--header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}' \
"${{ secrets.COOLIFY_URL }}/api/v1/deploy?uuid=${{ secrets.COOLIFY_STAGING_APP_UUID }}&force=true"
deploy-prod:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Trigger Coolify Production Deploy
run: |
# Deploy using application UUID
curl -X POST \
--header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}' \
"${{ secrets.COOLIFY_URL }}/api/v1/deploy?uuid=${{ secrets.COOLIFY_PROD_APP_UUID }}&force=true"