Session 4 — Exercises: Publish and Automate
Last updated on 2026-03-03 | Edit this page
Overview
In this session you will publish a website using GitHub Pages and set up a simple GitHub Actions workflow.
Time frame: approximately 75 minutes of hands-on work.
Task 1: GitHub Pages
Level 1 — Enable GitHub Pages
- Go to your repository on GitHub.
- Navigate to Settings → Pages.
- Under Source, select the
mainbranch and the/ (root)folder. - Click Save.
- Wait 1–2 minutes, then visit the URL shown (typically
https://USERNAME.github.io/git-intro-yourname/).
Checkpoint 1
Your README.md is now rendered as a web page accessible
via the GitHub Pages URL. Share the link with your partner to confirm it
works.
Level 2 — Improve your site
- Edit your
README.mdto make it look better as a web page:- Add a main heading (
# My Project Page). - Add sections with subheadings.
- Include a link to your GitHub profile.
- Add a main heading (
- Commit and push the changes.
- Wait for the site to rebuild and check the updated page.
Level 3 — Add a separate page
Create a new file
about.mdwith information about yourself.-
Add a link from
README.mdtoabout.md: Commit, push, and verify that the link works on your published site.
If you want more control, create an index.html file:
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Project</title>
</head>
<body>
<h1>Welcome to My Project</h1>
<p>This site is published with GitHub Pages.</p>
</body>
</html>
Note: if index.html exists, GitHub Pages will use it
instead of README.md.
Task 2: GitHub Actions — Spell Check
Level 1 — Add a spell-check workflow
On GitHub, click Add file → Create new file.
Name the file
.github/workflows/spellcheck.yml(GitHub will create the directories automatically).-
Paste the following content:
Commit the file with the message
Add spell-check workflow.
Checkpoint 2
The file .github/workflows/spellcheck.yml exists in your
repository. You can see it in the Code tab under
.github/workflows/.
Level 2 — Trigger the workflow
- Create a new branch (e.g.
test-spellcheck). - Edit any file and intentionally introduce a spelling error (e.g. “Tihs is a tset”).
- Commit and push the branch.
- Open a Pull Request from
test-spellchecktomain. - Go to the Actions tab and watch the spell-check workflow run.
Checkpoint 3
The Actions tab shows a workflow run. It may report spelling errors — that is expected! You have successfully triggered a GitHub Action.
Level 3 — Fix and re-run
- Fix the intentional spelling errors in your branch.
- Commit and push again.
- The workflow will re-run automatically on the updated PR.
- Verify that the workflow passes (green check mark).
- Go to the Actions tab in your repository.
- Click on the workflow run to see details.
- Click on the job name (e.g.
spellcheck) to see the log output. - On the PR page, you can also see the status check at the bottom.
Task 3: Wrap-Up and Reflection
Level 1 — Review your learning
Write a short summary (3–5 sentences) in your README.md
about what you learned in this workshop. Include:
- The most important concept you learned.
- Something that surprised you.
- One thing you want to explore further.
Commit and push.
Level 2 — Create a release
- On GitHub, go to Releases → Draft a new release.
- Create a tag
v1.0.0. - Title it “Workshop Complete”.
- Write a brief description of the repository content.
- Click Publish release.
Level 3 — Explore further
- Browse the GitHub Actions Marketplace and find another action that could be useful for your project.
- Look into Zenodo and how you would link your repository for automatic DOI creation.
Summary
By the end of this session you should have: