CI/CD Setup¶
The deploy workflow builds the site and pushes the output to your GitHub Pages repository.
How It Works¶
- You push to
mainin your forkedhomebaserepo - GitHub Actions runs
.github/workflows/deploy.yml - It installs deps, builds the site with 11ty, and force-pushes
_site/to your Pages repo
Setup Steps¶
1. Create a GitHub Personal Access Token¶
- Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click Generate new token
- Set Repository access → Only select repositories → choose your Pages repo (e.g.
yourname/yourname.github.io) - Under Permissions → Repository permissions, set Contents to Read and write
- Generate and copy the token
2. Add the Token as a Secret¶
- In your
homebasefork, go to Settings → Secrets and variables → Actions - Click New repository secret
- Name:
GH_DEPLOY_TOKEN - Value: paste the token from step 1
3. Update the Workflow¶
Edit .github/workflows/deploy.yml and change DEPLOY_REPO at the top to your own Pages repo:
4. Configure GitHub Pages¶
In your Pages repo (e.g. yourname.github.io):
- Go to Settings → Pages
- Set Source: Deploy from a branch →
main→/ (root)
5. Custom Domain (Optional)¶
Set seo.cname in _data/site.yaml to your custom domain:
Leave it blank (or remove the field) to use the default yourname.github.io URL.
Also configure your DNS to point to GitHub Pages (CNAME to yourname.github.io).
6. Analytics (Optional)¶
To enable Google Analytics 4:
- In your
homebasefork, go to Settings → Secrets and variables → Actions - Add a secret named
GOOGLE_ANALYTICS_IDwith yourG-XXXXXXXXXXmeasurement ID
Note
Leave the secret unset to disable analytics entirely. The ID is never stored in the repo.
Triggering Manually¶
You can trigger a deploy without pushing by going to Actions → Build and Deploy → Run workflow.
Scheduled Rebuilds¶
scheduled-rebuild.yml automatically rebuilds the site daily at 8am UTC. This keeps
time-sensitive content fresh -- notably the YouTube channel feed, which fetches the latest
video at build time.
To change the frequency, edit the cron expression in .github/workflows/scheduled-rebuild.yml:
| Cron expression | Frequency |
|---|---|
0 */6 * * * |
Every 6 hours |
0 8 * * * |
Once daily at 8am UTC |
0 8 * * 1 |
Once weekly, Monday 8am UTC |
To disable scheduled rebuilds, delete .github/workflows/scheduled-rebuild.yml.
Warning
GitHub automatically disables scheduled workflows in repos with no activity (pushes, PRs, etc.) for 60 days. If this happens, re-enable it via the Actions tab.