getting-started
Deploy on Cloudflare Pages
Deploying Jekyll Site on Cloudflare Pages
Prerequisites
- GitHub/GitLab repository with Jekyll site
- Cloudflare account
Deployment Steps
1. Prepare Your Repository
- Ensure
Gemfileand build scripts are in the repository - Add build command in repository
2. Cloudflare Pages Setup
- Log in to Cloudflare
- Navigate to Pages
- Connect to Git Provider
3. Configuration
# Build settings
Build command: bundle exec jekyll build
Output directory: _site
# Environment
Ruby version: 3.2.2
4. Deploy Configuration
# Sample deployment script
bundle install
bundle exec jekyll build
Continuous Deployment
- Automatic builds on every push
- Preview deployments for pull requests
Custom Domain
- Add custom domain in Cloudflare Pages
- Configure DNS settings
- Enable HTTPS
Troubleshooting
- Check build logs
- Verify Ruby and Jekyll versions
- Ensure all dependencies are in
Gemfile
Best Practices
- Use environment variables
- Configure build caching
- Set up branch deployments