ci-cd-github-actions-rails
Installation
SKILL.md
GitHub Actions for Rails
The default CI/CD for new Rails projects. Fast, free up to 2000 min/month for private repos, generous for public. This skill gives you a production-grade workflow file plus the principles (cache aggressively, parallelize tests, gate deploys on green main, OIDC over long-lived secrets).
The opinion
One workflow per concern (CI, Deploy, Security Scan). Parallelize tests via matrix. Cache gems, Yarn, and asset builds. Use the official
ruby/setup-rubyaction withbundler-cache: true. Use OIDC for AWS / GCP — never long-livedAWS_ACCESS_KEY_IDsecrets. Deploy via Kamal on push to main, after CI passes. Branch protection on main: PR + 1 review + green CI + linear history.
Pattern 1: The CI workflow
# .github/workflows/ci.yml
name: CI
on:
pull_request:
push:
branches: [main]