GitHub Actions for Beginners: Automate the Boring Stuff

By Naresh · October 23, 2026 · Tutorials

GitHub Actions is a free automation runner built into GitHub. Every time you push code, a machine in the cloud can test it, build it, or deploy it — while you do nothing. Setup is one YAML file.

Advertisement

Your first workflow

Create the file .github/workflows/ci.yml:

name: CI
on:
  push:
    branches: [main]
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: pip install -r requirements.txt
      - run: python -m pytest

Push to main. The Actions tab in your repo lights up, shows each step live, and gives you a green check or a detailed log of what broke. That is the whole trick.

Reading the file

Secrets

Never paste API keys into the YAML. Repo → Settings → Secrets and variables → Actions → add them, then reference as secrets.MY_KEY inside your workflow.

Advertisement

Three useful patterns

schedule:
  - cron: "0 9 * * 1"   # every Monday, 09:00 UTC

Scheduled jobs suit weekly reports or dependency refreshes. Next, the manual button:

on:
  workflow_dispatch:

Adds a Run workflow button in the UI. And matrix builds (test on several versions at once) look like strategy.matrix.python: ["3.11","3.12"] inside a job.

Gotchas

Full reference: the official docs at docs.github.com/en/actions. A practical first project: auto-deploy your static site on every push — compare hosts in GitHub Pages vs Cloudflare Pages.

Need something like this built? I take freelance projects in streaming, web apps and automation. Get in touch.

More in Tutorials