Deployment Workflow - Pre-Rendered Site
Overview
Your Quarto website is now configured to be rendered locally and then deployed to Netlify as a static site. This approach is simpler and avoids the need to install R on Netlify’s build servers.
How It Works
- Local Rendering: You render the site on your local machine (where R is installed)
- Git Tracking: The
_sitefolder is tracked in Git (not ignored) - Netlify Deployment: Netlify simply serves the pre-built files from the
_sitefolder
Deployment Steps
Every time you update your site:
Make changes to your
.qmdfiles, projects, or blog postsRender locally:
quarto renderCommit and push:
git add -A git commit -m "Update site content" git push origin quartoNetlify automatically deploys the updated
_sitefolder
Configuration Files
netlify.toml
[build]
command = "" # No build command - site is pre-rendered
publish = "_site".gitignore
# _site/ is commented out so it's tracked in Git
/.quarto/
**/*.quarto_ipynb
Benefits of This Approach
✅ Simple: No complex build setup on Netlify
✅ Fast: Netlify just serves files, no rendering needed
✅ Reliable: Builds happen locally where you control the environment
✅ R Support: Full R support since you render where R is installed
✅ Preview: You can test the site locally before deploying
Important Notes
- Always run
quarto renderbefore committing - The
_sitefolder will be large (contains all HTML, CSS, JS, images) - Make sure to push the
_sitefolder to Git - Netlify will deploy automatically when you push to the
quartobranch
Troubleshooting
If Netlify deployment fails: 1. Check that _site folder exists and is pushed to Git 2. Verify netlify.toml has publish = "_site" 3. Check Netlify build logs for any errors
Your site should now deploy successfully on Netlify! 🎉