{"id":15022228,"url":"https://github.com/roots/setup-trellis-cli","last_synced_at":"2025-10-17T11:12:28.178Z","repository":{"id":38312663,"uuid":"450723000","full_name":"roots/setup-trellis-cli","owner":"roots","description":"👷 Sets up Trellis CLI for GitHub Action workflows","archived":false,"fork":false,"pushed_at":"2025-03-11T23:49:47.000Z","size":2875,"stargazers_count":31,"open_issues_count":7,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-12T06:15:00.877Z","etag":null,"topics":["github-actions","trellis","trellis-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/roots.png","metadata":{"funding":{"github":"roots"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2022-01-22T05:10:00.000Z","updated_at":"2025-03-03T15:22:21.000Z","dependencies_parsed_at":"2023-12-14T16:50:04.435Z","dependency_job_id":"e5afbebd-3be5-4137-b725-2c493619d9e2","html_url":"https://github.com/roots/setup-trellis-cli","commit_stats":{"total_commits":54,"total_committers":7,"mean_commits":7.714285714285714,"dds":0.6851851851851851,"last_synced_commit":"72c0c7ecaaf355d740f5cbef7309631c42d34589"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roots%2Fsetup-trellis-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roots%2Fsetup-trellis-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roots%2Fsetup-trellis-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roots%2Fsetup-trellis-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roots","download_url":"https://codeload.github.com/roots/setup-trellis-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525138,"owners_count":21118619,"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":["github-actions","trellis","trellis-cli"],"created_at":"2024-09-24T19:57:40.230Z","updated_at":"2025-10-17T11:12:23.133Z","avatar_url":"https://github.com/roots.png","language":"JavaScript","readme":"# setup-trellis-cli\n\n[![Build status](https://img.shields.io/github/actions/workflow/status/roots/setup-trellis-cli/test.yml?branch=main\u0026style=flat-square)](https://github.com/roots/setup-trellis-cli/actions)\n![GitHub release](https://img.shields.io/github/release/roots/setup-trellis-cli?style=flat-square)\n\nThe `roots/setup-trellis-cli` action is a JavaScript action that sets up [Trellis CLI](https://github.com/roots/trellis-cli) in your GitHub Actions workflow by:\n\n* Downloading a specific version of trellis-cli (defaults the latest) and adding it to the `PATH`.\n* Creating a `.vault_pass` file with your Ansible Vault password input.\n* Initializing the [Trellis](https://github.com/roots/trellis) project in the GitHub repo by running the `trellis init` command.\n    * Creates a virtual environment and installs dependencies (mainly Ansible) with automatic caching.\n    * Installs Ansible galaxy roles by running `trellis galaxy install` with automatic caching.\n    \nSee the [**Deploying Trellis WordPress Sites with GitHub Actions guide**](https://roots.io/trellis/docs/deploy-with-github-actions/).\n\n## Example usage\n\n```yaml\nruns-on: ubuntu-latest\nsteps:\n- uses: actions/checkout@v2\n- uses: roots/setup-trellis-cli@v1\n  with:\n    ansible-vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}\n    repo-token: ${{ secrets.GITHUB_TOKEN }}\n- run: trellis deploy production\n```\n\nSee the [examples](./examples) for some full workflow examples including a site\nwith a [Sage](https://github.com/roots/sage)-based theme and a project\nwith a [multi-repo](https://github.com/roots/trellis/issues/883#issuecomment-329054858) [setup](https://github.com/roots/trellis/issues/883#issuecomment-329052189).\n\nSee [Workflow syntax for GitHub Actions](https://help.github.com/en/articles/workflow-syntax-for-github-actions) for more details on writing GitHub workflows.\n\n## Setup\n\n## Inputs\n\n#### `ansible-vault-password`\n**Required** Ansible Vault password. Use a [GitHub secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets) for this value (example in usage\nabove).\n\nThis can also be set using the GitHub CLI:\n\n```bash\ngh secret set ANSIBLE_VAULT_PASSWORD -b $(cat trellis/.vault_pass)\n```\n\nNote: this is a required input even if you don't use Ansible Vault. Just set\nthis to any random placeholder string.\n\n#### `repo-token`\nOptionally set the GitHub token for API authorization. Setting this token will avoid any potential API rate limits.\n\nThe best option is to set this to the default token secret which GitHub automatically sets: `secrets.GITHUB_TOKEN`.\n\nSee https://docs.github.com/en/actions/security-guides/automatic-token-authentication\n\n#### `auto-init`\nWhether to automatically run the `trellis init` command after install.\n\n**Default**: `true`\n\nIf you want to manage dependencies manually yourself, disable this option.\n\n#### `cache-virtualenv`\nWhen enabled, the virtualenv created by the `trellis init` command is automatically\ncached.\n\n**Default**: `true`\n\n#### `galaxy-install`\nWhether to automatically run the `trellis galaxy install` command to install\nAnsible Galaxy roles.\n\n**Default**: `true`\n\n#### `trellis-directory`\nPath to the Trellis project directory. This defaults to `trellis` to match the default directory structure of a project created with `trellis new`.\n\n**Default**: `trellis`\n\n#### `version`\nVersion of Trellis CLI to install. See\n[Releases](https://github.com/roots/trellis-cli/releases) for all possible\nversions.\n\nNote: if you want a specific version, include the 'v' in the version name (eg:\n`v1.5.1`).\n\n**Default**: `latest`\n\n## SSH known hosts\nMost usages of this action will require SSH known hosts to be set, including the example workflow which uses `shimataro/ssh-key-action`.\n\nSince the GitHub Action runner will be the client SSHing into your remote Trellis server, this is needed to allow a connection from GitHub -\u003e your server, which means the known host is for the remote server hostname.\n\nThis value is _not_ just the hostname/IP, it needs be in OpenSSH format which looks like this:\n\n```plain\nexample.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl\n```\n\nOr the hashed output:\n```plain\n|1|nLf9avvc+tz8nFgUW/3tPwjTA4Q=|dLZn1guXUrBjLg4s23ird724guA= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl\n```\n\nThere's a few ways to get this value:\n\n1. using trellis-cli:\n```bash\ntrellis key generate\n```\n2. manually using `ssh-keyscan`:\n```bash\nssh-keyscan -t ed25519 -H MY_SERVER_HOSTNAME\n```\n3. from your `~/.ssh/known_hosts` file (if you've previously SSH'd into the server):\n\nNote: always use a GitHub secret to store this value. Do not hardcode the plain\ntext value in your workflow file. `trellis key generate` will use a secret\nautomatically.\n\n## Outputs\n\n#### `version`\nThe Trellis CLI version installed. Example: `v1.5.1`\n\n## Contributing\n\nContributions are welcome from everyone. We have [contributing guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started.\n\n## Community\n\nKeep track of development and community news.\n\n- Join us on Roots Slack by becoming a [GitHub sponsor](https://github.com/sponsors/roots) or [patron](https://www.patreon.com/rootsdev)\n- Participate on the [Roots Discourse](https://discourse.roots.io/)\n- Follow [@rootswp on Twitter](https://twitter.com/rootswp)\n- Read and subscribe to the [Roots Blog](https://roots.io/blog/)\n- Subscribe to the [Roots Newsletter](https://roots.io/subscribe/)\n","funding_links":["https://github.com/sponsors/roots","https://www.patreon.com/rootsdev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froots%2Fsetup-trellis-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froots%2Fsetup-trellis-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froots%2Fsetup-trellis-cli/lists"}