Robots do the work for you
Right now it works like this: you change the code → commit → push → GitHub Pages updates. That’s already automation! But the pros go further – GitHub Actions is a robot that, after every push, does whatever you tell it to: build the website, check for errors, deploy.
This is called CI/CD (continuous integration / continuous deployment). It sounds complicated, but it’s really just: “Robots check and deploy everything after every change.”
Show me: your first workflow
Tasks for robots are written into a file inside the .github/workflows/ folder. For example, deploy.yml:
name: Check and deploy
on:
push:
branches: [main] # run after every push to main
jobs:
check:
runs-on: ubuntu-latest # the robot gets a clean Linux computer
steps:
- uses: actions/checkout@v4 # download my code
- name: Check HTML
run: |
echo "Checking that index.html exists…"
test -f index.html && echo "OK ✅"
After a push, a running robot shows up on GitHub under the Actions tab. A green checkmark means everything passed; a red X means something’s wrong, and the robot will tell you what.
GitHub Pages already uses Actions! If you look at the Actions tab, you’ll see that deploying Pages runs through a workflow called “pages build and deployment”. You’re now adding your own extra checks on top – like a real boss who won’t let a broken version go live.
Now it’s your turn 💪
- Create
.github/workflows/deploy.ymlfollowing the example, push it, and watch the Actions tab. - Break something on purpose: rename
index.htmltoindex2.html, push – the workflow turns red. Fix it and watch it turn green. (This is the most important experience of this lesson!) - Add a second step to the workflow – checking that no
localhostwas left in the HTML:
- name: No localhost in the code
run: |
if grep -r "localhost:3000" *.html; then
echo "WARNING: localhost was left in the code!" && exit 1
fi
echo "OK ✅"
- Write in
LAUNCH.md: “The website deploys automatically, a robot checks every push.”
Check: Your workflow runs in the Actions tab after every push. You’ve seen both red (broken) and green (fixed). The website updates without a single manual step.
What to take away from this lesson
- CI/CD = robots check and deploy after every push.
- Workflows are written into
.github/workflows/*.yml. - A red X is your friend: it stops a mistake before visitors ever see it.
© 2026 Ing. Martin Polak / AlgoRhino · Content usage terms