CI fails on Netlify preview deploy: NETLIFY_AUTH_TOKEN / NETLIFY_SITE_ID not set

Aperta
#4 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
github-actions, yaml
Ambito
ci-cd, devops

Direzione di ricerca

Inizia dalle righe 79-85 di .github/workflows/ci.yml e dall’esecuzione non riuscita collegata nell’issue. Conferma come il passaggio Preview Deploy to Netlify riceve i suoi secrets e come i passaggi di build precedenti segnalano il successo. Il lavoro è completato quando il comportamento previsto del workflow per l’anteprima o per i secrets mancanti è esplicito, mentre la build di Jupyter Book rimane il risultato CI significativo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The Build Project [using jupyter-book] workflow (ci.yml) fails on every PR — but not because of the build. The jupyter-book build succeeds; the job dies on its final step, Preview Deploy to Netlify, because the required secrets are not configured in this repo.

Evidence

From the failed run on PR #1 (run 26938631605), step conclusions:

success   Build Download Notebooks (sphinx-tojupyter)
success   Build HTML
success   Install Node.js
failure   Preview Deploy to Netlify   <-- only failure

Error message:

Error: Authentication required. NETLIFY_AUTH_TOKEN is not set and
`netlify login --request <message>` can be used to authenticate.
##[error]Process completed with exit code 1.

gh secret list for the repo returns nothing — no Actions secrets are configured. The step at .github/workflows/ci.yml (Preview Deploy to Netlify) passes secrets.NETLIFY_AUTH_TOKEN and secrets.NETLIFY_SITE_ID, which are empty, so the Netlify CLI exits 1 and the whole job goes red.

Impact

  • Pre-existing and repo-wide — affects every PR (e.g. #1 and #3), unrelated to the content of any individual PR. The lectures themselves build cleanly.
  • Because the job goes red, the build result is masked by an infrastructure step, which makes it hard to tell at a glance whether a real build break has occurred.

(There is also a separate older failure on main in the Build & Publish to GH Pages workflow — likely the same class of missing-config/secret issue — worth a look while we're here, but tracked separately if needed.)

Options to resolve

  1. Add the secrets (enables PR previews) — a repo/org admin sets NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID under Settings → Secrets and variables → Actions. The QuantEcon org already uses Netlify previews on the other lecture repos, so a token should exist.
  2. Guard the step so CI is green when the token is absent (e.g. forks / before secrets land):
    - name: Preview Deploy to Netlify
      if: ${{ env.NETLIFY_AUTH_TOKEN != '' }}
      env:
        NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
      # ...
    
    (Secrets can't be referenced directly in if:, so map to env first, then test env.)
  3. Remove the Netlify preview step if previews aren't wanted for this repo.

Recommended: option 1 if we want previews here, with option 2 as a resilience improvement regardless so the build remains the real pass/fail signal.

Lingua principale
Jupyter Notebook
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QuantEcon/scipy_tutorial_2026

Tutte le issue di QuantEcon/scipy_tutorial_2026

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.