Back to journalNotes from the craft

DevOps

A Reliable CI/CD Workflow with GitHub Actions

Design a pipeline that gives fast feedback on pull requests and deploys only code that has passed repeatable checks.

Nyi Nyi Zin

Software developer & lifelong learner

A Reliable CI/CD Workflow with GitHub Actions

Every pull request should receive feedback

Start with a workflow that installs from the lockfile, runs type checking, executes tests, and performs linting. These checks should be fast enough that developers do not avoid them.

Separate verification from deployment

Build artifacts and deployment permissions should be protected. A common pattern is to verify every pull request, then deploy only from a trusted branch after the same checks pass.

Use caching carefully

Dependency caching can make workflows much faster, but the cache key should include the lockfile. A stale cache must never be allowed to hide a changed dependency graph.

Keep secrets out of logs

Use repository or environment secrets, give tokens the smallest required permissions, and avoid printing environment objects during debugging. CI is part of the application's security boundary.

DevOps

Written by

Nyi Nyi Zin

I build for the web, mobile, and everything behind the scenes. This is where I share what I learn along the way.

More about me