{"id":15472781,"url":"https://github.com/mwdelaney/trellis-github-deployment","last_synced_at":"2025-04-15T06:16:37.175Z","repository":{"id":148761331,"uuid":"620885739","full_name":"MWDelaney/trellis-github-deployment","owner":"MWDelaney","description":"GitHub Actions and workflows to automate deployment of a Roots/Trellis project to staging and production environments.","archived":false,"fork":false,"pushed_at":"2024-09-12T18:08:26.000Z","size":113,"stargazers_count":29,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T06:16:31.142Z","etag":null,"topics":["deployment-automation","github-actions","trellis","trellis-cli","wordpress"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MWDelaney.png","metadata":{"files":{"readme":".github/README.template.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"MWDelaney"}},"created_at":"2023-03-29T15:02:45.000Z","updated_at":"2025-02-07T17:55:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7f73321-3d6d-43a8-911b-4b37ab2bb976","html_url":"https://github.com/MWDelaney/trellis-github-deployment","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWDelaney%2Ftrellis-github-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWDelaney%2Ftrellis-github-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWDelaney%2Ftrellis-github-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWDelaney%2Ftrellis-github-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MWDelaney","download_url":"https://codeload.github.com/MWDelaney/trellis-github-deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016643,"owners_count":21198833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment-automation","github-actions","trellis","trellis-cli","wordpress"],"created_at":"2024-10-02T02:40:54.533Z","updated_at":"2025-04-15T06:16:37.158Z","avatar_url":"https://github.com/MWDelaney.png","language":null,"readme":"# example.com\n\nThis [Trellis](https://roots.io/trellis/)-based WordPress project uses GitHub Actions for continuous deployment.\n\n[![Deploy to staging](https://github.com/MWDelaney/example.com/actions/workflows/deploy-staging.yml/badge.svg?branch=staging)](https://github.com/MWDelaney/example.com/actions/workflows/deploy-staging.yml) [![Deploy to production](https://github.com/MWDelaney/example.com/actions/workflows/deploy-production.yml/badge.svg)](https://github.com/MWDelaney/example.com/actions/workflows/deploy-production.yml)\n\n## Deployment\n\nDeployment occurs automatically from this GitHub repository using [GitHub Actions](https://github.com/features/actions).\n\nThis project deploys to the `staging` and `production` environments when a `pull_request` is `merged` to `staging` or `main` branches respectively.\n\nGitHub **Deployments** maintain a history of deployments and provide links to the current deployments in each.\n\n[See the current deployments](https://github.com/MWDelaney/example.com/deployments)\n\n\u003cdetails\u003e\n\u003csummary\u003eInitial Setup\u003c/summary\u003e\n\n_Note: these instructions presume your `staging` and `production` environments (servers) and DNS are already configured._\n\n### System Requirements\n\n* [Trellis CLI](https://github.com/roots/trellis-cli)\n* [Github CLI](https://cli.github.com)\n\n### 1. Create GitHub Secrets\n\nDeployment relies on 4 GitHub secrets:\n\nModify and run the following to generate these secrets:\n\n```bash\ntrellis key generate \u0026\u0026 gh secret set ANSIBLE_VAULT_PASSWORD -b $(cat trellis/.vault_pass) \u0026\u0026 gh secret set TRELLIS_SITE_SLUG -b example.com\n```\n\n#### Secrets\n\n* `TRELLIS_DEPLOY_SSH_PRIVATE_KEY` - A private key used by GitHub to connect to your environments.\n* `TRELLIS_DEPLOY_SSH_KNOWN_HOSTS` - `known_hosts` keys for your environments.\n* `ANSIBLE_VAULT_PASSWORD` - Your new Trellis project's [vault password](https://roots.io/trellis/docs/vault/).\n* `TRELLIS_SITE_SLUG` - The slug from your new Trellis project's `wordpress_sites.yml` file.\n\n### 2. Generate Trellis aliases\n\nFrom your `site` directory, run:\n\n```bash\ntrellis alias\n```\n\nAnd update `site/wp-cli.yml` as instructed.\n\n### 3. Grant workflow permissions\n\n 1. In this repository, navigate to `Settings` -\u003e `Actions` -\u003e `General` -\u003e `Workflow Permissions`.\n 2. Enable \"read and write\" permissions.\n\n### 4. Reprovision your environments to allow GitHub's deploy key\n\nRun the following:\n  \n```bash\ntrellis provision staging \u0026\u0026 trellis provision production\n```\n\n\u003c/details\u003e\n\n## Development\n\n1) Clone this repository locally\n2) In the repository directry, run `trellis init`\n3) In the repository directory, run `trellis up`\n","funding_links":["https://github.com/sponsors/MWDelaney"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwdelaney%2Ftrellis-github-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwdelaney%2Ftrellis-github-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwdelaney%2Ftrellis-github-deployment/lists"}