Deployment Guide
Learn how to deploy your ABC showcase to popular hosting platforms.
GitHub Pages
Automatic Deployment
- Enable GitHub Pages in repository settings
- Set source to GitHub Actions
- Create workflow file
.github/workflows/jekyll.yml:
name: Deploy Jekyll site to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
run: bundle exec jekyll build --baseurl "$"
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
environment:
name: github-pages
url: $
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Configuration
Update _config.yml with your repository name:
baseurl: "/your-repo-name"
url: "https://username.github.io"
Netlify
One-Click Deploy
- Connect repository to Netlify
- Configure build settings:
- Build command:
bundle exec jekyll build - Publish directory:
_site
- Build command:
- Set environment variables:
JEKYLL_ENV:production
netlify.toml
Create netlify.toml in root:
[build]
command = "bundle exec jekyll build"
publish = "_site"
[build.environment]
JEKYLL_ENV = "production"
RUBY_VERSION = "3.1"
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
[[redirects]]
from = "/*"
to = "/404.html"
status = 404
Vercel
Deploy with Vercel CLI
- Install Vercel CLI:
npm i -g vercel - Run:
vercel - Follow prompts to link repository
vercel.json
Create vercel.json:
{
"buildCommand": "bundle exec jekyll build",
"outputDirectory": "_site",
"framework": "jekyll",
"installCommand": "bundle install"
}
Environment Variables
Production Settings
Set these for optimal production builds:
JEKYLL_ENV=production- Enables production modeBUNDLE_WITHOUT=development- Skip dev dependencies
Custom Variables
Add to _config.yml:
# Development
development:
api_url: "http://localhost:4000"
# Production
production:
api_url: "https://api.yoursite.com"
Access in templates:
Performance Optimization
Build Optimization
- Exclude unnecessary files in
_config.yml - Enable incremental builds:
jekyll build --incremental - Use caching in CI/CD pipelines
Asset Optimization
# _config.yml
sass:
style: compressed
exclude:
- node_modules/
- src/
- Gemfile
- Gemfile.lock
- README.md
Troubleshooting
Build Failures
Missing dependencies:
bundle install
bundle update
Path issues:
- Check
baseurlin_config.yml - Use
/pathin templates
Version conflicts:
bundle exec jekyll build --verbose
Cache Issues
Clear build cache:
# Local
rm -rf _site .jekyll-cache
# Netlify: Clear cache in Deploy settings
# Vercel: Redeploy without cache
# GitHub Pages: Re-run workflow
Next Steps
- GitHub Actions Guide - Automate workflows
- Performance Optimization - Speed up your site
- SEO Guide - Improve search rankings