diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6c7ae6..819311e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,6 @@ name: CI on: pull_request: - paths: - - 'listener/src/migrations/**' - - 'listener/src/database/**' - - 'listener/src/scripts/**' - - 'listener/package.json' push: branches: - main @@ -21,7 +16,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 20 cache: "npm" cache-dependency-path: dashboard/package-lock.json - name: Install dependencies @@ -54,7 +49,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 20 cache: "npm" cache-dependency-path: listener/package-lock.json - name: Install dependencies diff --git a/.github/workflows/preview-cleanup.yml b/.github/workflows/preview-cleanup.yml index 28731a2..3c24dce 100644 --- a/.github/workflows/preview-cleanup.yml +++ b/.github/workflows/preview-cleanup.yml @@ -17,6 +17,7 @@ jobs: - uses: actions/checkout@v4 - name: Delete Cloudflare Pages deployment + if: github.event.pull_request.head.repo.full_name == github.repository uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 19bf4b0..661912c 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: npm cache-dependency-path: dashboard/package-lock.json diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index b0f1509..ac8d160 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -31,9 +31,20 @@ jobs: cd listener npm ci npm run build + - name: Start listener (background) + run: | + cd listener + nohup npm run start >/tmp/listener.log 2>&1 & + echo $! >/tmp/listener.pid - run: | cd dashboard npm ci npm run build - run: | - bash scripts/health-check.sh http://localhost:3000/health + bash scripts/health-check.sh + - name: Stop listener + if: always() + run: | + if [ -f /tmp/listener.pid ]; then + kill "$(cat /tmp/listener.pid)" || true + fi