basics
Deployment Guide
How to deploy your Mycelium garden to various platforms
draft: true
Deployment Guide
Mycelium generates static files that can be deployed anywhere.
Build
First, build your site:
npm run build
Output is in the dist/ folder.
Deployment Options
Netlify (Recommended)
- Push to GitHub
- Connect repo to Netlify
- Build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
Or use the CLI:
npm install -g netlify-cli
netlify deploy --prod --dir=dist
Vercel
npm install -g vercel
vercel --prod
Or connect via the Vercel dashboard.
GitHub Pages
Add to astro.config.mjs:
export default defineConfig({
site: 'https://username.github.io',
base: '/repo-name',
});
Then build and push to gh-pages branch.
Cloudflare Pages
- Connect repo in Cloudflare dashboard
- Build settings:
- Build command:
npm run build - Build output:
dist
- Build command:
Self-Hosted
Copy dist/ contents to any static hosting:
scp -r dist/* user@server:/var/www/html/
Environment Variables
Set production URLs:
# Netlify/Vercel
PUBLIC_SITE_URL=https://your-domain.com
Custom Domain
- Add domain in host dashboard
- Update DNS records
- Update
siteinastro.config.mjs
Preview Builds
Most platforms create preview deployments for PRs:
- Netlify:
deploy-preview-123.netlify.app - Vercel:
project-git-branch.vercel.app
Continuous Deployment
Push to main → automatic deployment. That’s it!