Automate the pipeline.
Session 3
© The Build Fellowship 2024
Where we are in the arc
You measured. You diagnosed.�Now you fix.
The OrbitTasks pipeline runs only on your laptop today. There is no CI.
By the end of this session, you'll have a working GitHub Actions workflow that automates your process and runs faster than any local setup.
© The Build Fellowship 2024
Agenda
What CI/CD�actually is
© The Build Fellowship 2024
© The Build Fellowship 2024
Every change merges into the main branch frequently, and every change is automatically built and tested.
The goal is to keep the main branch in a known-good state at all times.
This is the part you build today.
Delivery means the build is always ready to ship.
Deployment means it actually ships, automatically.
Most teams do CI + manual deploy first, then graduate to CD when they trust their tests.
Continuous Integration (CI)
Continuous Delivery & Deployment (CD)
Two letters. Two ideas.
Often confused.
© The Build Fellowship 2024
The First Principle
Why pipelines exist at all
handshake
The Pipeline Deal
01. THE AGREEMENT
A pipeline is a deal: developers commit code, and in return the system tells them whether the code is safe to merge.
The deal only works if the answer comes back fast and is trustworthy.
02. THE BREAKDOWN
Slow pipelines break the deal.
Flaky pipelines break the deal worse, because now the answer is sometimes a lie.
Industry tools, and how to choose
You'll meet many CI tools over your career. The good news: they all share the same building blocks. The differences are surface-level. Pick whatever your team already uses.
GitHub Actions
What we use today. Free for public repos. Tight GitHub integration.
CircleCI / Buildkite
Premium options, faster on big builds.
Jenkins
Older, self-hosted. Everywhere in older enterprise.
GitLab CI / Bitbucket Pipelines
If your team is on those platforms.
© The Build Fellowship 2024
GitHub Actions�in 10 minutes
© The Build Fellowship 2024
© The Build Fellowship 2024
THE MENTAL MODEL
A GitHub Actions workflow has four parts
A workflow is a YAML file in .github/workflows/. Master these four ideas to understand any CI system.
When
Events that trigger the workflow, like a pull request or a push.
Where
Runners where the code executes (e.g., Ubuntu, macOS, Windows).
What
The jobs and steps that perform the actual work (tests, builds).
With what
The environment: env vars, secrets, and caches needed for execution.
The smallest workflow that does anything
SIX LINES, ON A REAL CODEBASE
© The Build Fellowship 2024
Trigger
on: pull_request triggers the workflow when a PR opens.
Runner
runs-on: ubuntu-latest picks a Linux runner.
Steps
jobs.test.steps defines the list of things to run: check out, install dependencies, and tests.
What you've already got, together
Read it together; we'll improve it in place
© The Build Fellowship 2024
code
speed
groups
Action: Open .github/workflows/ci.yml. Walk through it line by line.
Observation: No caching, no parallelism, no matrix. Cold run takes ~13 mins, mostly in the serial test:api suite (real HTTP calls).
Goal: Today we reach ~5–7 mins. In Workshop 5, we achieve an order-of-magnitude collapse by mocking clients.
Improve this file in place, one commit at a time, mirroring in your own forks.
Now you�write yours.
© The Build Fellowship 2024
Workshop, 15 minutes, together
© The Build Fellowship 2024
We push the repo to your fork together and watch .github/workflows/ci.yml execute in the Actions tab.
Note the wall-clock duration of each step. A cold run is ~13 minutes, and you'll see almost all of it land on test:api.
We record the per-step durations in your logbook as we go; we compare against them at the end of the session.
See the baseline run on GitHub
timer
groups
code
Things that will trip you up.
…even after doing this for years.
space_bar
Indentation & YAML
YAML is whitespace-sensitive. Use spaces, not tabs to avoid cryptic parsing errors.
cloud_off
Environment Drift
"Works locally" issues are usually missing env vars or Node version mismatches in CI.
bug_report
State Contamination
Test order can hide bugs. CI runs in a fresh environment; your local machine might not.
check_circle
False Positives
Steps passing on green unexpectedly usually mean a missing "exit 1" in your script.
© The Build Fellowship 2024
Now make it�faster.
© The Build Fellowship 2024
Caching: the first big optimization
Often a 2-3× speedup for free
speed
Every job starts on a fresh runner with no node_modules.
Without caching, every job re-downloads everything from npm.
With caching, the runner restores ~/.npm from the previous run.
Adding one line saves 30–60 seconds per run.
© The Build Fellowship 2024
Workshop: 10 minutes together
Add caching and re-run
© The Build Fellowship 2024
history
Together we add cache: npm to your actions/setup-node step.
Push, wait for the run to complete, then run it again. Compare the install duration on run 1 vs run 2. The second run should be noticeably faster.
We record both numbers in your logbook; your improvement proposal in Session 6 wants them.
© The Build Fellowship 2024
Parallelization with matrix strategies
The second big speedup
layers
A strategy.matrix runs the same job multiple times with different inputs. We use it two ways:
Workshop: 10 minutes together
Run jobs in parallel
© The Build Fellowship 2024
split
Together we split your CI into two parallel jobs, one for apps/api and one for apps/web. Run it.
Note that the total pipeline duration is now roughly the longer of the two jobs, not the sum.
© The Build Fellowship 2024
Compare your before and after.
Around the room: what was your original duration, and what is it now?
speed
This is exactly the�Platform Engineer job
The work you just did is what you get paid for
A platform engineer at Stripe or Shopify spends a meaningful fraction of their week iterating on CI pipelines.
Caching strategies, matrix configs, smart sharding.
The job is partly mechanical and partly judgment: judgment about which 5% of the codebase is worth optimizing because it runs on every PR.
settings_suggest
© The Build Fellowship 2024
© The Build Fellowship 2024
Key Objectives
visibility Examine the repo from a brand-new developer's perspective.
terminal Write a Makefile / npm scripts that turn three commands into one.
auto_awesomeImprove documentation and add automation that removes daily friction.
Session 4: Developer Experience & Tooling
CI/CD makes the pipeline fast. DevEx makes the *whole job* faster.
Questions?
© The Build Fellowship 2024