Repository navigation
GITHUB_PAGES
This guide covers how to deploy and manage GitHub Pages sites using GitHub Commander.
GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files from a repository and publishes them as a website.
GitHub Commander supports:
- Enabling/disabling Pages
- Deploying with GitHub Actions
- Manual deployment
- Framework-specific workflows
The Pages Panel includes:
- Pages Status - Shows if Pages is enabled and the URL
- Deployment Settings - Configure branch, directory, and domain
- Build Settings - Framework and GitHub Actions configuration
- Actions - Enable, disable, and deploy buttons
- Workflow Editor - View and edit GitHub Actions workflow
- Deployment Logs - Track deployment progress
- Select a repository
- Go to the Pages Panel
- Configure deployment settings:
- Source Branch - Branch to deploy from (default: main)
- Source Directory - Folder to deploy (default: /)
- Custom Domain - Optional custom domain
- Enforce HTTPS - Enable HTTPS for custom domains
- Click "Enable Pages"
- Pages will be enabled for the repository
Common choices:
- main - Main production branch
- master - Legacy default branch
- gh-pages - Dedicated Pages branch
- / - Root of repository
- /docs - Documentation folder
- /dist - Build output folder
- /build - Alternative build folder
- Enter your domain in "Custom Domain" field
- Configure DNS records on your domain provider:
- Add A record pointing to GitHub's IP
- Or add CNAME record to
[username].github.io
- Wait for DNS propagation
- Enable "Enforce HTTPS" once DNS is verified
GitHub Actions is GitHub's automation platform. For Pages, it can:
- Build your site automatically
- Run tests before deployment
- Deploy on every push
- Support complex build processes
- Select a repository
- Go to the Pages Panel
- In Build Settings:
- Check "Use GitHub Actions for building"
- Select your framework from the dropdown
- Click "Generate Workflow" to preview the workflow
- Click "Deploy"
- Select the folder containing your built site files
- The workflow file will be created at
.github/workflows/deploy-pages.yml - Files will be uploaded to the repository
- Push to trigger the deployment
- No build step required
- Direct upload of files
- Simplest option for basic sites
Workflow includes:
-
npm ci- Install dependencies -
npm run build- Build the application - Upload
dist/orbuild/folder
Requirements:
-
package.jsonwith build scripts - Dependencies in
package-lock.json
Workflow includes:
- Setup Hugo extended
-
hugo --minify- Build site - Upload
public/folder
Requirements:
- Hugo content in
content/folder - Configuration in
config.toml
Workflow includes:
- Setup Ruby
-
bundle install- Install dependencies -
bundle exec jekyll build- Build site - Upload
_site/folder
Requirements:
- Jekyll configuration files
- Gemfile with dependencies
- Upload specified directory
- No automatic build
- Suitable for pre-built sites
The workflow is created at:
.github/workflows/deploy-pages.yml
You can edit this file manually or regenerate it from the panel.
- Simple static sites without build steps
- Pre-built sites
- Testing without Actions
- Quick deployments
- Select a repository
- Go to the Pages Panel
- Uncheck "Use GitHub Actions for building"
- Configure source branch and directory
- Click "Deploy"
- Select the folder containing your site files
- Files will be uploaded directly to the repository
- Changes are committed to the configured branch
| Feature | Manual | Actions |
|---|---|---|
| Build step | No | Yes |
| Automatic deployment | No | Yes (on push) |
| Testing | No | Yes |
| Framework support | Limited | Extensive |
| Complexity | Low | Medium |
The branch that triggers deployment:
- main - Most common for production
- master - Legacy default
- gh-pages - Dedicated Pages branch
- Custom branches supported
The folder containing your site:
- / - Entire repository
- /docs - Documentation
- /dist - Build output
- /build - Alternative build output
- Custom paths supported
Setting up a custom domain:
- Purchase a domain
- Configure DNS:
-
A Record: Points to
185.199.108.153(and other IPs) -
CNAME: Points to
[username].github.io
-
A Record: Points to
- Enter domain in Pages settings
- Wait for DNS propagation (up to 48 hours)
- Enable HTTPS once verified
- Automatically provisions SSL certificate
- Redirects HTTP to HTTPS
- Recommended for all sites
- Requires DNS to be configured first
- Go to the Pages Panel
- View "Deployment Logs" section
- All actions are logged with timestamps
- Deployment start
- Workflow generation
- File upload progress
- Success/failure status
- Error messages if applicable
For detailed build logs:
- Go to repository on GitHub.com
- Click "Actions" tab
- Select the workflow run
- View detailed logs for each step
Solutions:
- Verify repository has Pages enabled in settings
- Check authentication
- Ensure branch exists
- Verify source directory path
Solutions:
- Ensure Pages is enabled
- Verify workflow file syntax
- Check that source branch exists
- Verify source directory path
- Check GitHub Actions logs for errors
Common causes:
- Missing dependencies
- Incorrect build commands
- Syntax errors in code
- Missing configuration files
Solutions:
- Check GitHub Actions logs
- Verify
package.jsonor equivalent - Test build locally first
- Review framework documentation
Symptoms:
- Custom domain not resolving
- HTTPS not working
Solutions:
- Wait for DNS propagation (up to 48 hours)
- Verify DNS records are correct
- Check domain registrar settings
- Use dig/nslookup to verify
Solutions:
- Verify source directory path
- Check file paths in repository
- Ensure index.html exists
- Verify branch is correct
- Test locally before deploying
- Use feature branches for changes
- Review workflow before committing
- Monitor deployment logs
- Test deployed site
- Minimize file sizes
- Optimize images
- Use CDN for assets
- Enable caching
- Minify CSS/JS
- Keep dependencies updated
- Use HTTPS
- Don't commit sensitive data
- Review third-party code
- Use environment variables for secrets
After deploying Pages, explore:
- Wiki Management - Add documentation
- File Operations - Update site content