Tutorial: Publishing Your Site with GitHub Pages
This step-by-step tutorial shows you how to make your Oral History as Data collection publicly accessible on the web using GitHub Pages, GitHub’s free hosting service.
What You’ll Accomplish
By the end of this tutorial, you’ll have:
- A public website for your oral history collection
- A shareable URL that anyone can visit
- Automatic updates whenever you modify your content
Before You Begin
Ensure you have:
- A GitHub repository created from the OHD template
- Your metadata and transcript files uploaded
- Basic configuration completed in _config.yml
Step-by-Step Publishing Process
Step 1: Access Repository Settings
- Go to your repository on GitHub
- Open your web browser
- Navigate to your repository URL (https://github.com/your-username/your-repository)
- Make sure you’re logged in
- Click the “Settings” tab
- Find the top menu bar with options like “Code,” “Issues,” etc.
- Click “Settings” (usually the rightmost option)
Settings tab location on GitHub
Step 2: Configure GitHub Pages
- Navigate to Pages settings
- In the left sidebar, scroll down to find “Pages”
- Click on “Pages” under the “Code and automation” section
- Select build method
- Under “Build and Deployment”, look for “Source”
- Select “GitHub Actions” from the dropdown menu
Important: If you see a ‘GitHub Pages Jekyll’ option with a ‘Configure’ button, DO NOT click it. The OHD template already includes the necessary workflow file, and clicking ‘Configure’ would create a duplicate file and cause an error.
- Confirm the workflow is ready
- GitHub will automatically detect the existing workflow file in your repository
- You should see a message indicating that GitHub Actions is configured
- No additional setup is needed since the OHD template already includes the necessary workflow file
Step 3: Wait for Your Site to Build
- Monitor the build process
- After committing, GitHub will start building your site
- This typically takes 2-5 minutes for the first build
- You can see the progress by clicking on the “Actions” tab
- Check deployment status
- A green checkmark will appear when the build succeeds
- Your site will be deployed to:
https://[your-username].github.io/[repository-name]/
Step 4: Access and Share Your Site
- Visit your published site
- Use the URL format:
https://[your-username].github.io/[repository-name]/
- For example:
https://jsmith.github.io/my-oral-history/
- If you see a 404 error, wait a few more minutes and try again
- Use the URL format:
- Add the URL to your repository info
- Return to your repository’s main page
- Look for the “About” section on the right sidebar
- Click the gear icon
- Paste your site URL in the “Website” field
- Click “Save”
Making Updates to Your Published Site
Whenever you make changes to your repository:
- Edit files directly on GitHub or push changes from your computer
- GitHub Actions automatically rebuilds your site
- Changes appear on your site within a few minutes
This automatic process makes it easy to maintain and update your collection over time.
Common Issues and Solutions
Problem | Solution |
---|---|
404 error when visiting site | Wait 5-10 minutes; first build takes longer |
Build fails | Check Actions tab for error details; often a YAML formatting issue |
Missing images or files | Ensure paths are correct and files are in the repository |
Transcripts don’t display | Verify objectid in metadata matches transcript filename |
Slow loading | Optimize image sizes; use external services for media files |
What’s Next?
Now that your site is published:
- Share your collection with your audience
- Test thoroughly on different devices and browsers
- Consider enhancements like:
GitHub Pages is a free service with some (soft) limitations: 1GB storage maximum and 100GB bandwidth per month.