Skip to content

operations-project/github-action-ddev-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DDEV Hosting Reusable GitHub Actions

Self-hosted automation for ddev projects

These reusable GitHub Workflows allow you to automate the deployment and testing of DDEV sites on your own servers.

Useful for hosting and CI/CD servers.

Reusable Workflows

Include these workflows inside your own github workflow files:

  • operations.site.deploy.yml
    • Deploy Code: git clone and checkout desired branch to desired path.
    • Start Site: Write special DDEV configs and run ddev start to launch the site.
    • Import Site: Run your own sync command to import or install your site.
  • operations.site.destroy.yml
    • Remove Site: ddev rm -OR
    • Remove Code: rm -rf $DIR
  • More workflows TBD.

Server Setup

To prepare a server for running these workflows, you can use the Operations Site Runner Ansible collection. see https://github.com/operations-project/ansible-collection-site-runner.

The main components:

  • Sysadmin users from GitHub accounts.
  • Platform user for running sites.
  • Control (sudo) user for configuring server.
  • Docker
  • DDEV
  • GitHub runners, one per repository.

Usage

Copy the example.*.yml workflows located at .github/workflows/ to your projects .github/workflows folder.

Pull Requests and Live Environments must be handled in separate files, so that live sites only deploy on specific branches.

For a complete example, see .github/workflows/example.site.preview.yml

... then your own project steps ...


About

GitHub Action for deploying a site with DDEV.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages