Deploy Your Site
Deploy your Flux site to any platform that hosts static files.
Build Your Site
Create the production build:
npm run build
This generates a _site/
folder containing your optimized website files.
Deployment Platforms
Netlify
- Push your code to GitHub/GitLab
- Connect your repository to Netlify
- Set build command:
npm run build
- Set publish directory:
_site
- Deploy
Netlify handles builds and deployments automatically.
Vercel
- Connect your GitHub repository
- Vercel detects the static site configuration
- Builds and deploys on each commit
Cloudflare Pages
- Connect your Git repository
- Build command:
npm run build
- Output directory:
_site
- Deploy to global CDN
GitHub Pages
- Enable GitHub Pages in repository settings
- Choose deployment source (branch or GitHub Actions)
- Configure build workflow if using GitHub Actions
Your Own Server
Copy the _site/
folder to your web server:
npm run build
rsync -av _site/ user@yourserver.com:/var/www/html/
Automated Deployments
Most platforms deploy automatically when you push to your main branch.
For custom deployment workflows, use GitHub Actions:
# .github/workflows/deploy.yml
name: Deploy Site
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install
- run: npm run build
# Add deployment steps
Custom Domains
- Configure custom domain in platform settings
- Update DNS records to point to hosting provider
- Enable HTTPS (usually automatic)
Testing Before Deployment
Test your production build locally:
npm run build
npm run preview
This serves your built site locally to catch issues before deployment.
Troubleshooting
Broken assets: Check that asset paths are correct and files exist in the build output.
404 errors: Verify routing configuration and that all pages are properly built.
Build failures: Ensure all dependencies are in package.json
and the build runs locally.
Summary
Flux generates static files that deploy anywhere. Choose a platform, configure the build settings, and deploy your site.