diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e092293b..a8cdae11 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -53,20 +53,23 @@ jobs: # Pass the access token as an environment variable directly to this step # This ensures the Supabase CLI can authenticate. env: + # Set NODE_OPTIONS to force the node process to exit after completion. + # This prevents the job from hanging on self-hosted runners. + NODE_OPTIONS: "--exit" SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} run: | echo "Deploying Edge Functions to Supabase project: ${{ env.SUPABASE_PROJECT_ID }}" # The SUPABASE_ACCESS_TOKEN env var handles login automatically. - # The --exit flag helps ensure the npm process terminates cleanly in the runner. # The --project-ref flag links the CLI to your project. - npm exec -- --exit supabase functions deploy system-check --project-ref ${{ env.SUPABASE_PROJECT_ID }} - npm exec -- --exit supabase functions deploy delete-user --project-ref ${{ env.SUPABASE_PROJECT_ID }} - npm exec -- --exit supabase functions deploy seed-database --project-ref ${{ env.SUPABASE_PROJECT_ID }} + npm exec -- supabase functions deploy system-check --project-ref ${{ env.SUPABASE_PROJECT_ID }} + npm exec -- supabase functions deploy delete-user --project-ref ${{ env.SUPABASE_PROJECT_ID }} + npm exec -- supabase functions deploy seed-database --project-ref ${{ env.SUPABASE_PROJECT_ID }} # --- Frontend Deployment --- - name: Build React Application - run: npm run build -- --exit # This creates the 'dist' directory with static files. - # The REACT_APP_* env vars are automatically used by Create React App here. + env: + NODE_OPTIONS: "--exit" + run: npm run build # This creates the 'dist' directory with static files. - name: Deploy Frontend via Local Copy run: |