Skip to content

Add Netlify PR preview deployments#236

Merged
yarikoptic merged 1 commit intomasterfrom
enh-netlify-preview
Apr 5, 2026
Merged

Add Netlify PR preview deployments#236
yarikoptic merged 1 commit intomasterfrom
enh-netlify-preview

Conversation

@yarikoptic
Copy link
Copy Markdown
Member

Summary

Add Netlify configuration for automatic PR preview deployments, resolving the long-standing request in #119.

  • Production deployment stays on GitHub Pages (docs.dandiarchive.org) — no changes there
  • Netlify is used only for PR previews — every PR gets an automatic preview link posted as a comment
  • Single file addition: netlify.toml

Setup required (one-time, Netlify dashboard)

Connect Netlify before merging so this PR itself serves as the test:

  1. Go to app.netlify.com and sign in with GitHub
  2. Click "Add new site""Import an existing project" → select GitHub
  3. Authorize the Netlify GitHub App for the dandi org (if not already done)
  4. Select the dandi/dandi-docs repository
  5. Netlify will auto-detect netlify.toml from the PR branch — click "Deploy site"
  6. Important: Do NOT add a custom domain (docs.dandiarchive.org) in Netlify — that stays on GitHub Pages
  7. Optionally rename the Netlify site to something recognizable (e.g., dandi-docs) in Site configurationSite detailsChange site name

Netlify will immediately pick up this open PR and post a preview link, confirming everything works before merge.

After this, every future PR will automatically get:

  • A Netlify build triggered on open/push
  • A deploy preview link posted as a PR comment (e.g., https://deploy-preview-42--dandi-docs.netlify.app)
  • A GitHub status check showing build pass/fail

Test plan

  • netlify.toml build command works: pip install -r requirements.txt && mkdocs build
  • Connect repo on Netlify, verify it builds this PR and posts a preview link
  • Verify the preview renders correctly

Closes #119

🤖 Generated with Claude Code

Enable automatic PR preview builds via Netlify while keeping
GitHub Pages as the production deployment for docs.dandiarchive.org.

Closes #119

Co-Authored-By: Claude Code 2.1.92 / Claude Opus 4.6 <noreply@anthropic.com>
@yarikoptic
Copy link
Copy Markdown
Member Author

may be I do need to merge first... no harm should be so I will proceed

@yarikoptic yarikoptic merged commit 97024b0 into master Apr 5, 2026
3 checks passed
@yarikoptic
Copy link
Copy Markdown
Member Author

I manually triggered build and we got https://dandi-docs.netlify.app/ ... let's see if PRs rebased now would get their previews

@CodyCBakerPhD CodyCBakerPhD deleted the enh-netlify-preview branch April 5, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI to PRs to build/test

1 participant