CI/CD on GitHub

push → checks → deploy: GitHub Actions, protected main, secrets and releases by tag. No FTP on a Friday evening.

4 lessons7 interview questions4 terminal practices

A red CI that got merged anyway. A server key in a public repository. This is where the course began: FTP and "last upload wins". In this module a robot checks every push, main refuses red PRs, and a v1.3 tag ships the release by itself, to your server or to wordpress.org SVN.

CourseGit Basics Course · Module 7 of 7 · Stage 3 "Production"
LearnGitHub Actions workflows, PR checks and branch protection, secrets, deploy from main or by tag
How4 lessons on you/my-plugin: CI on PR #42 is red, main isn't protected, no secrets. You fix all three in the gh terminal

The end of FTP

sequenceDiagram
  participant D as You
  participant GH as GitHub
  participant A as Actions
  participant S as Server
  D->>GH: git push origin v1.3
  GH->>A: deploy workflow (on: tags v*)
  A->>A: build, phpcs, tests
  A-->>D: production: waiting for approval
  D->>A: Approve
  A->>S: deploy (secrets.DEPLOY_SSH_KEY)
  A-->>D: ✓ released

Manual vs automated

FTP / manualAfter Module 7
Checks"looks fine on my machine"phpcs and tests on every PR
mainanyone can push anythingprotected: green CI and review required
Keysin the repo or in a chatGitHub Secrets, never in code
Releaseupload files, hope nothing is missinga tag starts build → approve → deploy
Rollbackfind the old ziprevert or redeploy the previous tag

You'll be able to answer

  • What does a GitHub Actions workflow consist of?
  • How do you protect main from direct pushes?
  • How do you store deploy keys?
  • How do you roll back a bad release?

Lessons in this module 4 lessons