In this post, I’ll show how we used GitHub Actions to automate CI/CD for a real open-source fullstack application — BinaryStudioAcademy/bsa-2022-streamlet.
🧱 About the Project
The project is a collaborative platform for video content, built as part of an educational initiative. It includes:
- Node.js backend (NestJS)
- PostgreSQL, Prisma
- Frontend on React
- Docker-based development
- Tests and linting
This made it a perfect playground to implement CI workflows.
⚙️ Why CI/CD with GitHub Actions
We wanted to:
- Run tests on every pull request
- Validate that code builds
- Lint for consistency
- Eventually — deploy to environments
And we didn’t want to add extra tools or services — just GitHub.
🚀 Creating the GitHub Actions Workflow
All CI/CD workflows live in .github/workflows/
. Here’s a minimal setup for Node.js:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm run lint
- run: npm run test
✅ Tip: You can create multiple workflows for frontend/backend separately if needed.
🧪 Test Output in GitHub UI
After pushing a PR, GitHub shows CI status directly in the PR tab. Green means ✅ everything is passing.
You can also explore logs in the Actions tab. This helps reviewers catch problems early — before merging anything into main
.
📦 Expanding to Deployments
In advanced scenarios, we also:
- Built Docker images
- Deployed to staging (with secrets)
- Used
concurrency
to cancel stale builds
But even with just the basics, we improved code quality and confidence.
⚠️ Gotchas & Lessons Learned
- Always cache
node_modules
to speed up runs (withactions/cache
) - Keep workflows fast — slow pipelines discourage devs
- If you split into microservices — build and test them in parallel
- Protect
main
branch using CI rules in GitHub settings
✅ Conclusion
GitHub Actions is a powerful and free way to bring CI/CD into any project — even student or hobby apps. Our team benefited a lot from having automated checks, and it made collaboration smooth and scalable.
If you're just starting, don’t overcomplicate. Start with one workflow file. Add jobs as your project grows.
Got questions or want to share your setup? Drop a comment!