← All insightsAutomation

Automating GitHub Actions from scratch

CodeWizard Academy · 11 July 2026 · 3 min read · Intermediate

Anything you do to GitHub Actions twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.

1. Install it reproducibly

bash
mkdir -p .github/workflows
$EDITOR .github/workflows/ci.yml   # workflows are just YAML files in the repo

2. Describe the desired state

A CI workflow with caching and a matrix build.

yaml
name: ci
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix: { node: [18, 20, 22] }
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: ${{ matrix.node }}, cache: npm }
      - run: npm ci
      - run: npm test

3. Run it from CI

Deploy to AWS using OIDC - no long-lived secrets.

yaml
permissions: { id-token: write, contents: read }
steps:
  - uses: aws-actions/configure-aws-credentials@v4
    with:
      role-to-assume: arn:aws:iam::1234:role/gha-deploy
      aws-region: eu-west-1
  - run: aws s3 sync ./dist s3://acme-site --delete

Want senior help putting GitHub Actions to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult