CI/CD stands for Continuous Integration and Continuous Deployment/Delivery. It automates not only testing but also delivery of your app.
🏗️ CI vs. CD
- CI (Continuous Integration): Build and test every commit automatically.
- CD (Continuous Delivery/Deployment): Automatically push code to production (or staging) once tests pass.
⚡ GitHub Actions Tips
- Workflows: Automate things like build, test, deploy.
- Triggers: Run workflows on push, pull request, schedule, etc.
- Jobs: Each workflow can have multiple jobs (e.g., test, deploy).
📝 Example: Deploy Only on Main
1
2
3
4
5
6
7
8
9
10
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# ... build steps ...
- name: Deploy
run: echo "Deploying app!"
💡 Try It!
- Add a deploy job that only runs on the
main
branch. - Explore GitHub Actions Marketplace for prebuilt actions!
Next: Recap and next steps for .NET mastery!