The UBC Open Robotics website is deployed to GitHub Pages automatically via GitHub Actions. The live site is served from https://openrobotics.ca and backed by the GitHub Pages deployment at https://ubc-openrobotics.github.io/website/.
main- Active development. All feature branches merge here via pull request.prod- Production. A push to this branch triggers a GitHub Pages deploy.
This separation means nothing reaches the public site until it has been explicitly promoted from main to prod.
The deployment is driven by two workflows in .github/workflows/:
-
deploy.yml- triggered on pushes toprod. It:- Checks out the
prodbranch - Sets up Ruby 3.1 and Python 3.x
- Installs the Python
pyyamldependency - Runs
scripts/fetch_positions.pyto pull the latest recruitment positions from Google Sheets (using thePOSITIONS_SHEET_URLrepository secret) - Builds the Jekyll site with
bundle exec jekyll build(withJEKYLL_ENV=production) - Uploads the generated
_site/as a Pages artifact - Deploys the artifact to GitHub Pages
- Checks out the
-
update-prod.yml- a manually triggered workflow (workflow_dispatch) that mergesmainintoprodand pushes. Running this is equivalent to promoting the current state ofmainto production.
These steps only need to be done once per repository. If you are a contributor deploying existing work, skip to Deploying to Production.
- Go to the repository: https://github.com/UBC-OpenRobotics/website
- Navigate to Settings → Pages
- Under Build and deployment, set Source to GitHub Actions
- Save
If prod does not exist yet:
git checkout main
git pull
git checkout -b prod
git push -u origin prodThe deploy workflow fetches open positions from a Google Sheet. Add the secret:
- Navigate to Settings > Secrets and variables > Actions
- Click New repository secret
- Name:
POSITIONS_SHEET_URL - Value: the full Google Sheet URL (the sheet must be publicly viewable)
- Save
See recruitment-setup.md for the expected sheet format. If you skip this, the build will fail at the "Fetch positions" step.
The site is served at https://openrobotics.ca. To change the domain:
- Add a
CNAMEfile at the repo root containing the domain name - Configure the DNS records with your registrar to point at GitHub Pages
- Enable Enforce HTTPS under Settings → Pages
- Update
url:in_config.ymlto match
There are two supported ways to deploy. Both end with a push to prod, which triggers deploy.yml.
Use this when main already contains everything you want live.
- Go to the Actions tab
- Select Update Prod from Main
- Click Run workflow --> Run workflow
This merges main into prod with a merge commit and pushes it. The deploy.yml workflow will then start automatically.
Use this if you want to deploy something that is not on main (e.g. a hotfix branch).
git checkout prod
git pull
git merge main # or any other branch you want to ship
git push origin prodIf prod is already at the commit you want deployed and you just want to re-run the build (for example, to refresh the recruitment positions):
- Go to the Actions tab
- Select Deploy to GitHub Pages
- Click Run workflow, pick the
prodbranch, and run
- Go to the Actions tab and watch the Deploy to GitHub Pages run. Builds usually take 2–3 minutes.
- Once the
deployjob shows a green check, the site is live. - Open https://openrobotics.ca (or
https://ubc-openrobotics.github.io/website/if using the default domain) and hard-refresh (Ctrl+Shift+R / Cmd+Shift+R) to bypass the CDN cache.
Before promoting to prod:
- Build locally:
bundle exec jekyll buildsucceeds with no warnings you didn't expect - Serve locally:
bundle exec jekyll serveand click through the affected pages - Navigation still works on every top-level page
- Any new project page appears at
/projects/<name>/ - Images and assets load (check the browser console for 404s)
-
_config.yml'surlandbaseurlare correct for the target domain
If a bad deploy hits production:
-
Identify the last known-good commit on
prod(checkgit log prod). -
Revert on
prod:git checkout prod git pull git revert <bad-commit-sha> # preserves history - preferred git push origin prod
Or, if the bad state is a merge you want to undo entirely:
git checkout prod git reset --hard <good-commit-sha> git push --force-with-lease origin prod
Force-pushing to
prodis destructive - only do it if a revert is not viable, and coordinate with the team first. -
The push triggers
deploy.ymland the site returns to the good state within a few minutes.
- Confirm the
POSITIONS_SHEET_URLsecret is set - Confirm the Google Sheet is shared as Anyone with the link: Viewer
- Open the sheet URL in an incognito window to verify public access
- Check that the sheet's columns match the format in recruitment-setup.md
- Reproduce locally with
JEKYLL_ENV=production bundle exec jekyll build - Look for Liquid syntax errors, missing front matter, or bad collection entries
- Mismatched Ruby versions can cause native-gem failures - CI uses Ruby 3.1
- Confirm the workflow ran on the
prodbranch, notmain - Wait 2-3 minutes after the deploy finishes for Pages' CDN to propagate
- Hard-refresh (Ctrl+Shift+R) to bypass the browser cache
- Check Settings → Pages - the deployment source must be GitHub Actions
Gemfile.lockmay be out of date or incompatible with Ruby 3.1. Regenerate locally using Ruby 3.1 and commit the updated lockfile.
- Development guide - how to run and work on the site locally
- Recruitment setup - Google Sheets integration for the
/join/page - Legacy DEPLOYMENT.md - older deployment notes (kept for reference)