mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
80 lines
2.0 KiB
YAML
80 lines
2.0 KiB
YAML
name: CI/CD and Deploy
|
|
|
|
on:
|
|
# Disabled due to https://linear.app/replay/issue/PRO-1001/nutnew-broken-builds
|
|
#push:
|
|
# branches:
|
|
# - main
|
|
workflow_dispatch:
|
|
pull_request:
|
|
|
|
jobs:
|
|
typecheck:
|
|
name: Type Check
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup and Build
|
|
uses: ./.github/actions/setup-and-build
|
|
with:
|
|
sentry-auth-token: ${{ github.ref == 'refs/heads/main' && secrets.SENTRY_AUTH_TOKEN || '' }}
|
|
|
|
- name: Run type check
|
|
run: pnpm run typecheck
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup and Build
|
|
uses: ./.github/actions/setup-and-build
|
|
with:
|
|
sentry-auth-token: ${{ github.ref == 'refs/heads/main' && secrets.SENTRY_AUTH_TOKEN || '' }}
|
|
|
|
- name: Run ESLint
|
|
run: pnpm run lint
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup and Build
|
|
uses: ./.github/actions/setup-and-build
|
|
with:
|
|
sentry-auth-token: ${{ github.ref == 'refs/heads/main' && secrets.SENTRY_AUTH_TOKEN || '' }}
|
|
|
|
- name: Run tests
|
|
run: pnpm run test
|
|
|
|
deploy:
|
|
name: Deploy
|
|
needs: [typecheck, lint, test]
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/main'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup and Build
|
|
uses: ./.github/actions/setup-and-build
|
|
with:
|
|
sentry-auth-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
|
|
- name: Deploy to Cloudflare Pages
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
command: pages deploy
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|