This guide will walk you through setting up the DecisionsDev GitHub Pages website using Gatsby and the IBM Carbon Design theme.
Before you begin, ensure you have:
- Node.js 18.x or higher installed
- npm or yarn package manager
- Git installed
- Access to the DecisionsDev GitHub organization
- Permission to create repositories in the organization
- Go to GitHub DecisionsDev Organization
- Click "New repository"
- Important: Name it exactly
DecisionsDev.github.io - Set visibility to Public
- Do NOT initialize with README (we have files ready)
- Click "Create repository"
# Navigate to the template directory
cd C:\Users\7D4153897\Downloads\DecisionsDev.github.io
# Initialize git repository
git init
# Add all files
git add .
# Commit
git commit -m "Initial commit: Gatsby Carbon theme setup"
# Add remote
git remote add origin https://github.com/DecisionsDev/DecisionsDev.github.io.git
# Push to main branch
git branch -M main
git push -u origin main- Open GitHub Desktop
- File → Add Local Repository
- Choose
C:\Users\7D4153897\Downloads\DecisionsDev.github.io - Commit all files with message "Initial commit: Gatsby Carbon theme setup"
- Publish repository to GitHub
- Select DecisionsDev organization
- Name:
DecisionsDev.github.io - Push to GitHub
# Navigate to the repository
cd DecisionsDev.github.io
# Install dependencies
npm installThis will install:
- Gatsby
- gatsby-theme-carbon
- React and React DOM
- All required dependencies
# Start development server
npm run devThe site will be available at http://localhost:8000
Verify:
- Homepage loads correctly
- Navigation works
- Deployment Tools page displays
- All links work
- Styling looks correct
# Build the site
npm run buildThis creates optimized production files in the public/ directory.
Verify:
- Build completes without errors
- No warnings about missing files
- Public directory contains built files
# Deploy to gh-pages branch
npm run deployThis will:
- Build the site
- Create/update
gh-pagesbranch - Push built files to GitHub
# Build the site
npm run build
# Install gh-pages if not already installed
npm install -g gh-pages
# Deploy
gh-pages -d public- Go to repository Settings
- Click "Pages" in the left sidebar
- Under "Source":
- Branch:
gh-pages - Folder:
/ (root)
- Branch:
- Click "Save"
Wait 2-5 minutes for deployment
- Visit
https://decisionsdevelopment.github.io/ - Verify all pages load correctly
- Test navigation
- Check that all links work
- Test on mobile devices
Create .github/workflows/deploy.yml:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publicThis will automatically deploy when you push to main branch.
# Clear cache and rebuild
npm run clean
rm -rf node_modules package-lock.json
npm install
npm run build# Windows
netstat -ano | findstr :8000
taskkill /PID <PID> /F
# Linux/Mac
lsof -ti:8000 | xargs kill -9- Check GitHub Actions tab for errors
- Verify gh-pages branch exists
- Check GitHub Pages settings
- Wait 5-10 minutes for DNS propagation
- Clear browser cache
# Reinstall all dependencies
npm installAfter successful deployment:
- Add Content: Update pages with actual project information
- Add Images: Place images in
src/images/ - Customize Theme: Modify
gatsby-config.js - Add More Pages: Create new
.mdxfiles insrc/pages/ - Update Navigation: Edit theme configuration
# Update dependencies
npm update
# Check for outdated packages
npm outdated
# Update Gatsby
npm install gatsby@latest gatsby-theme-carbon@latest- Edit relevant category page (e.g.,
src/pages/deployment-tools.mdx) - Add project information
- Commit and push
- Site will auto-deploy (if CI/CD is set up)
If you encounter issues:
- Check the Gatsby Carbon Theme docs
- Review Gatsby documentation
- Open an issue in the repository
- Contact DecisionsDev maintainers
- Repository created as
DecisionsDev.github.io - Files uploaded to GitHub
- Dependencies installed
- Local development server works
- Production build successful
- Deployed to GitHub Pages
- GitHub Pages configured
- Site accessible at URL
- All pages load correctly
- Navigation works
- Mobile responsive
- CI/CD set up (optional)
© 2025 IBM Corporation