firecrawl/.github/workflows/ci.yml

64 lines
1.9 KiB
YAML
Raw Normal View History

2024-04-19 03:41:15 +08:00
name: CI/CD
on:
pull_request:
branches:
- main
# schedule:
# - cron: '0 */4 * * *'
2024-04-19 04:08:48 +08:00
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }}
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
HOST: ${{ secrets.HOST }}
LLAMAPARSE_API_KEY: ${{ secrets.LLAMAPARSE_API_KEY }}
2024-05-03 03:30:22 +08:00
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
2024-04-19 04:08:48 +08:00
NUM_WORKERS_PER_QUEUE: ${{ secrets.NUM_WORKERS_PER_QUEUE }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PLAYWRIGHT_MICROSERVICE_URL: ${{ secrets.PLAYWRIGHT_MICROSERVICE_URL }}
PORT: ${{ secrets.PORT }}
REDIS_URL: ${{ secrets.REDIS_URL }}
SCRAPING_BEE_API_KEY: ${{ secrets.SCRAPING_BEE_API_KEY }}
SUPABASE_ANON_TOKEN: ${{ secrets.SUPABASE_ANON_TOKEN }}
SUPABASE_SERVICE_TOKEN: ${{ secrets.SUPABASE_SERVICE_TOKEN }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
2024-05-22 04:24:09 +08:00
HDX_NODE_BETA_MODE: 1
2024-06-18 22:03:57 +08:00
FIRE_ENGINE_BETA_URL: ${{ secrets.FIRE_ENGINE_BETA_URL }}
2024-09-05 03:45:56 +08:00
USE_DB_AUTHENTICATION: ${{ secrets.USE_DB_AUTHENTICATION }}
2024-09-05 23:59:32 +08:00
ENV: ${{ secrets.ENV }}
2024-04-19 04:08:48 +08:00
2024-04-19 03:41:15 +08:00
jobs:
pre-deploy:
name: Pre-deploy checks
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
2024-05-03 03:30:22 +08:00
node-version: "20"
2024-04-19 03:41:15 +08:00
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
working-directory: ./apps/api
- name: Start the application
run: npm start &
working-directory: ./apps/api
2024-04-19 04:29:06 +08:00
id: start_app
2024-04-19 03:41:15 +08:00
- name: Start workers
run: npm run workers &
working-directory: ./apps/api
2024-04-19 04:29:06 +08:00
id: start_workers
2024-04-19 03:41:15 +08:00
- name: Run E2E tests
2024-04-19 04:29:06 +08:00
run: |
2024-04-22 02:39:36 +08:00
npm run test:prod
2024-05-03 03:30:22 +08:00
working-directory: ./apps/api