Automating My Portfolio Deployment with GitHub Actions
Building a Next.js application on a memory-constrained VPS was becoming a nightmare. Every time I wanted to add a blog post or make a small change, the build process would eat up all available RAM and sometimes crash the server. Here's how I solved it with GitHub Actions.
The Problem
My Oracle Cloud (OCI) VPS has limited resources:
ARM64 Ampere processor
Shared resources with portfolio and other services
Visibility vs Privacy: Keep code public, build artifacts private
Technical Stack
CI/CD: GitHub Actions
Container Registry: Docker Hub (private image)
Deployment: SSH-based auto-deploy
Build Environment: Node.js 18, Docker BuildKit
Memory Management: Temporary swap for local builds
Future Improvements
Potential enhancements I'm considering:
[ ] Add automated tests before deployment
[ ] Implement blue-green deployments
[ ] Add deployment notifications via Telegram
[ ] Set up preview deployments for PRs
[ ] Add performance monitoring
Final Thoughts
This setup has been a game-changer for my development workflow. I can now focus on creating content and improving features without worrying about infrastructure limitations.
The best part? Everything runs on free tiers:
GitHub Actions: Unlimited for public repos
Docker Hub: 1 free private repository
No ongoing costs!
If you're running a portfolio or blog on a budget VPS, I highly recommend this approach. Your server will thank you!
Questions? Feel free to check out my portfolio repository to see the complete setup!