Skip to content
Edson Francisco
  • Reliability, DevOps & legacy

GitHub Actions Template

Reusable CI/CD workflows for PHP, Laravel, Go and static sites, with SSH deployment.

Period
2024
Status
Archived
Role
Author

Problem

Every new project started with a CI pipeline copied from another one and adjusted in a hurry. Test and deploy steps varied from repository to repository.

Solution

Five ready-to-copy workflows: PHP, PHP with tests and SSH deployment to your own server, Laravel, Go, and a static site to GitHub Pages.

Technical decisions

  1. 01

    Deploy only after tests pass

    In the PHP-with-tests workflow, the SSH deploy step depends on the test job, so broken code never reaches the server.

  2. 02

    Least privilege for the Pages deploy

    The static workflow requests only pages: write and id-token: write and uses concurrency so two deploys never run at once.

  3. 03

    Secrets by reference only

    Host, user and SSH key come from repository secrets; the template contains no hard-coded value.

Images

No publishable screens: the system needs real data to run or is no longer online.

Technologies

  • GitHub Actions
  • PHP
  • Laravel

Verifiable results

reusable workflows
5