Files
ai-solver-test/.gitea/workflows/deploy.yml
dimkk 3522f243b8
Some checks failed
CI/CD / test (push) Failing after 1m10s
CI/CD / deploy-staging (push) Has been skipped
CI/CD / deploy-prod (push) Has been skipped
chpore: add gitea stuff
2026-01-03 19:27:49 +03:00

44 lines
1.1 KiB
YAML

# .gitea/workflows/deploy.yml
name: CI/CD
on:
push:
branches: [main, staging]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- 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 \
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
"${{ secrets.COOLIFY_URL }}/api/v1/applications/${{ secrets.COOLIFY_STAGING_APP_ID }}/deploy"
deploy-prod:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Trigger Coolify Production Deploy
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
"${{ secrets.COOLIFY_URL }}/api/v1/applications/${{ secrets.COOLIFY_PROD_APP_ID }}/deploy"