Deployment — Cheat Sheet
CI/CD & GitHub Actions · 1 topics. Download the PDF or the Instagram carousel and share it.
Cheat Sheet · AiCanCode.org
Deployment
CI/CD & GitHub Actions1 topicsQuick revision reference
1
Advanced Patterns — Deploy Strategies & Release Automation
Production CI/CD patterns include semantic versioning automation, blue-green and canary deployments, automatic changelog generation, and deployment rollbacks triggered by health checks.
- ✓Conventional Commits enable automatic semantic versioning: feat → minor bump, fix → patch, BREAKING CHANGE → major.
- ✓release-please opens "Release PRs" that auto-bump versions and generate changelogs.
- ✓Blue-green: instant traffic switch between two live environments; rollback = switch back (seconds).
- ✓Canary: gradual traffic shift with metric monitoring; safer but more complex to implement.
- ✓Automatic rollback on health failure makes deployments safe without requiring 24/7 on-call monitoring.
- ✓Always capture the current image/revision before deploying so rollback has a known good target.
Conventional commits and release-please automation
# Conventional Commit format:
# <type>(<scope>): <description>
# [optional body]
# [optional footer]
# Types:
# feat: new feature → bumps MINOR version (1.0.0 → 1.1.0)
# fix: bug fix → bumps PATCH version (1.0.0 → 1.0.1)
# docs: documentation only
# refactor: code change, no feature/fix
# test: adding tests
# chore: maintenance
# BREAKING CHANGE: footer → bumps MAJOR version (1.0.0 → 2.0.0)
# Examples:
# feat(auth): add OAuth2 login support
# fix(api): correct null pointer in user endpoint
# feat!: redesign API response format ↠! = breaking change
# feat(payments): add Stripe integration
#
# BREAKING CHANGE: The /users endpoint now returns camelCase fields
# .github/workflows/release.yml — automatic releases with release-please
name: Release Please
on:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node # parses package.json for version
token: ${{ secrets.GITHUB_TOKEN }}
# release-please opens a "Release PR" that:
# 1. Bumps version in package.json
# 2. Generates CHANGELOG.md from commits
# 3. When merged, creates a GitHub Release + git tagLearn this free with Aria, your AI tutor → AiCanCode.org/learn/cicd