Great for freelancers & beginners!
Struggling to Automate Your Deployments? You're Not Alone.
Imagine this: you've just finished coding a feature you're super proud of. But every time you push code, you have to manually build, test, and deploy it. It's exhausting, right?
Good news! You can automate all that in just 15 minutes with GitHub Actions — no servers, no complicated setups, no headaches.
Whether you're a freelancer juggling multiple projects or a beginner building your portfolio, this guide is for you. Let's get started!
What You'll Need
- A GitHub account
- A repository (any project will do)
- Basic understanding of Git commits and branches
(That's it — no fancy tools required!)
Step 1: Create a .github/workflows
Folder
Inside your project repo, create a new folder:
mkdir -p .github/workflows
This is where GitHub Actions looks for workflow files.
Step 2: Add Your First Workflow YAML File
Create a file named ci-cd.yml
inside .github/workflows
:
name: CI/CD Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js (or your environment)
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Deploy (example step)
run: echo "Deploying your app..."
Step 3: Push and Watch the Magic Happen
After saving the YAML file, push your changes to GitHub:
git add .
git commit -m "Add basic CI/CD workflow"
git push origin main
Now go to your GitHub repo > Actions tab. You'll see your workflow running automatically! 🚀
(Optional) Step 4: Add a Real Deployment Step
Want to actually deploy to Vercel, Netlify, AWS, or a VPS?
You can replace the Deploy
step with real deployment commands or use official actions. Example for Vercel:
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: Ⓜ️
vercel-org-id: Ⓜ️
vercel-project-id: Ⓜ️
(You'll need Vercel tokens — super easy to generate!)
Tools Used 🛠️
- GitHub Actions (Free tier is enough)
- Node.js (but you can swap for Python, Go, Java, etc.)
- Ubuntu Runner
Final Thoughts
You just built a fully functional CI/CD pipeline in under 15 minutes. Not bad, right?
This setup:
- Saves you hours of manual work
- Builds your reputation as a professional
- Catches bugs early with automated testing
- Deploys fast and consistently
🚀 Ready to Supercharge Your Projects?
- Want help automating your project? Let's talk!
- DM me if you want help with this setup
- Hire me for your DevOps projects
- Follow me for more DevOps tips
Let's make your development workflow smoother, faster, and more professional! 💜
Top comments (0)