{"id":21320436,"url":"https://github.com/eclass/semantic-release-ssh-commands","last_synced_at":"2025-10-29T20:13:38.493Z","repository":{"id":37037284,"uuid":"236994152","full_name":"eclass/semantic-release-ssh-commands","owner":"eclass","description":"semantic-release plugin to execute remote commands to deploy apps","archived":false,"fork":false,"pushed_at":"2024-11-19T11:41:37.000Z","size":887,"stargazers_count":0,"open_issues_count":30,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-19T12:50:28.908Z","etag":null,"topics":["semantic-release","semantic-release-plugin","ssh"],"latest_commit_sha":null,"homepage":null,"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/eclass.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-01-29T13:56:38.000Z","updated_at":"2021-11-08T22:37:29.000Z","dependencies_parsed_at":"2023-02-05T03:00:24.509Z","dependency_job_id":"b3f356c7-24bc-4413-af52-b67f75de9697","html_url":"https://github.com/eclass/semantic-release-ssh-commands","commit_stats":{"total_commits":430,"total_committers":6,"mean_commits":71.66666666666667,"dds":0.09302325581395354,"last_synced_commit":"073acc7de0760d299395f1ae83aaacff491a28de"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"eclass/template-semantic-release-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsemantic-release-ssh-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsemantic-release-ssh-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsemantic-release-ssh-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsemantic-release-ssh-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclass","download_url":"https://codeload.github.com/eclass/semantic-release-ssh-commands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225795392,"owners_count":17525316,"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":["semantic-release","semantic-release-plugin","ssh"],"created_at":"2024-11-21T19:47:50.308Z","updated_at":"2025-10-29T20:13:33.454Z","avatar_url":"https://github.com/eclass.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @eclass/semantic-release-ssh-commands\n\n[![npm](https://img.shields.io/npm/v/@eclass/semantic-release-ssh-commands.svg)](https://www.npmjs.com/package/@eclass/semantic-release-ssh-commands)\n![Node.js CI](https://github.com/eclass/semantic-release-ssh-commands/workflows/Node.js%20CI/badge.svg)\n[![downloads](https://img.shields.io/npm/dt/@eclass/semantic-release-ssh-commands.svg)](https://www.npmjs.com/package/@eclass/semantic-release-ssh-commands)\n[![dependencies](https://img.shields.io/david/eclass/semantic-release-ssh-commands.svg)](https://david-dm.org/eclass/semantic-release-ssh-commands)\n[![devDependency Status](https://img.shields.io/david/dev/eclass/semantic-release-ssh-commands.svg)](https://david-dm.org/eclass/semantic-release-ssh-commands#info=devDependencies)\n[![Coverage Status](https://coveralls.io/repos/github/eclass/semantic-release-ssh-commands/badge.svg?branch=master)](https://coveralls.io/github/eclass/semantic-release-ssh-commands?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/f84f0bcb39c9a5c5fb99/maintainability)](https://codeclimate.com/github/eclass/semantic-release-ssh-commands/maintainability)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n\u003e [semantic-release](https://github.com/semantic-release/semantic-release) plugin to deploy app with ssh commands\n\n| Step               | Description                                                              |\n|--------------------|--------------------------------------------------------------------------|\n| `verifyConditions` | Verify the presence of the `SSH_USER`, `SSH_HOST` environment variables. |\n| `publish`          | Deploy app over ssh.                                                     |\n\n## Install\n\n```bash\nnpm i -D @eclass/semantic-release-ssh-commands\n```\n\n## Usage\n\nThe plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration):\n\n```json\n{\n  \"plugins\": [\n    \"@semantic-release/changelog\",\n    \"@semantic-release/npm\",\n    \"@semantic-release/git\",\n    \"@semantic-release/gitlab\",\n    [\n      \"@eclass/semantic-release-ssh-commands\",\n      {\n        \"verifyConditionsCmd\": \"bash verify.sh\",\n        \"publishCmd\": \"bash deploy.sh ${nextRelease.version}\",\n      }\n    ]\n  ]\n}\n```\n\n**NOTE: verify.sh and deploy.sh are script located in remote server**\n\n## Configuration\n\n### Environment variables\n\n| Variable          | Description                           |\n| ----------------- | ------------------------------------- |\n| `SSH_USER`        | A ssh user                            |\n| `SSH_HOST`        | A ssh host                            |\n| `SSH_PRIVATE_KEY` | Content of private ssh key (Optional) |\n\n### Options\n\n| Variable              | Description                                                       |\n| --------------------- | ----------------------------------------------------------------- |\n| `verifyConditionsCmd` | A command to verificate. Required. Ex: \"docker pull myuser/myapp\" or \"bash verify.sh\" |\n| `publishCmd`          | A command to publish new release. Required. Ex: \"bash deploy.sh ${nextRelease.version}\" |\n\n\n### Examples\n\n```json\n{\n  \"plugins\": [\n    \"@semantic-release/changelog\",\n    \"@semantic-release/npm\",\n    \"@semantic-release/git\",\n    \"@semantic-release/gitlab\",\n    [\n      \"@eclass/semantic-release-ssh-commands\",\n      {\n        \"verifyConditionsCmd\": \"bash verify.sh\",\n        \"publishCmd\": \"bash deploy.sh ${nextRelease.version}\"\n      }\n    ]\n  ]\n}\n```\n\n```yml\n# .gitlab-ci.yml\nrelease:\n  image: node:alpine\n  stage: release\n  before_script:\n    - apk add --no-cache git openssh-client\n    - mkdir -p /root/.ssh\n    - chmod 0700 /root/.ssh\n    - ssh-keyscan $SSH_HOST \u003e /root/.ssh/known_hosts\n    - echo \"$SSH_PRIVATE_KEY\" \u003e /root/.ssh/id_rsa\n    - chmod 600 /root/.ssh/id_rsa\n    - echo \"    IdentityFile /root/.ssh/id_rsa\" \u003e\u003e /etc/ssh/ssh_config\n  script:\n    - npx semantic-release\n  only:\n    - master\n```\n\n```yml\n# .travis.yml\nlanguage: node_js\ncache:\n  directories:\n    - ~/.npm\nnode_js:\n  - \"12\"\nstages:\n  - test\n  - name: deploy\n    if: branch = master\njobs:\n  include:\n    - stage: test\n      script: npm t\n    - stage: deploy\n      addons:\n        ssh_known_hosts: $SSH_HOST\n      before_deploy:\n        - eval \"$(ssh-agent -s)\"\n        - echo \"$SSH_PRIVATE_KEY\" \u003e /tmp/deploy_rsa\n        - chmod 600 /tmp/deploy_rsa\n        - ssh-add /tmp/deploy_rsa\n      script: npx semantic-release\n\n```\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclass%2Fsemantic-release-ssh-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclass%2Fsemantic-release-ssh-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclass%2Fsemantic-release-ssh-commands/lists"}