{"id":23244634,"url":"https://github.com/jacobjove/deploy-docker-ssh","last_synced_at":"2026-02-20T02:01:27.996Z","repository":{"id":58792622,"uuid":"532680668","full_name":"jacobjove/deploy-docker-ssh","owner":"jacobjove","description":"An action for deploying Docker containers on a remote server","archived":false,"fork":false,"pushed_at":"2024-08-22T12:43:11.000Z","size":733,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-14T20:23:33.408Z","etag":null,"topics":["containers","deploy","docker","docker-compose","github-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jacobjove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-04T23:12:54.000Z","updated_at":"2024-07-18T16:32:52.000Z","dependencies_parsed_at":"2024-01-12T02:07:27.218Z","dependency_job_id":"57b369f9-88eb-472b-aed2-47a57e41c65e","html_url":"https://github.com/jacobjove/deploy-docker-ssh","commit_stats":{"total_commits":138,"total_committers":2,"mean_commits":69.0,"dds":"0.23913043478260865","last_synced_commit":"6d7d68a71aaf07a63daf955f0305b027b4082620"},"previous_names":["jacobjove/deploy-docker-ssh","iacobfred/deploy-docker-ssh"],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/jacobjove/deploy-docker-ssh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobjove%2Fdeploy-docker-ssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobjove%2Fdeploy-docker-ssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobjove%2Fdeploy-docker-ssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobjove%2Fdeploy-docker-ssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobjove","download_url":"https://codeload.github.com/jacobjove/deploy-docker-ssh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobjove%2Fdeploy-docker-ssh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29638772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"online","status_checked_at":"2026-02-20T02:00:07.535Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["containers","deploy","docker","docker-compose","github-actions"],"created_at":"2024-12-19T07:09:57.513Z","updated_at":"2026-02-20T02:01:27.948Z","avatar_url":"https://github.com/jacobjove.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deploy-docker-ssh\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"\"\u003e\u003cimg alt=\"deploy-docker-ssh status\" src=\"https://github.com/iacobfred/deploy-docker-ssh/workflows/units-test/badge.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis [action](https://docs.github.com/en/actions) pulls Docker images (and any necessary files)\nto a remote server via an SSH connection and starts up the associated container(s) after optionally\nrunning additional commands on the server.\n\nIt is intended to be used after Docker images are built and pushed to a container registry—e.g.,\nthrough use of Docker's [build-push-action](https://github.com/docker/build-push-action).\n\n## Inputs\n\n## `host`\n\nThe host name or IP address of the server to which this action will connect via SSH to deploy the container(s).\n\n## `user`\n\nThe username to use when connecting to the server via SSH.\n\n## `source-dir`\n\nThe directory within your repo that contains the files to be synced to the server's target directory.\n\n**Default**: `'.'`\n\n## `target-dir`\n\nThe absolute filepath of the directory to which necessary files (e.g., docker-compose.yml) will be transferred/synced on the server. This is also the working directory in which the command(s) specified in the `command` input will be executed.\n\n## `files`\n\nA space-delimited list of filepaths (relative to `source-dir`) to be synced to the server's target directory.\n\nNote: These relative paths are copied recursively into a temporary directory (via `cp -r`) which is then synced to the server's target directory via the `rsync` utility. The full relative paths are preserved; e.g., `a/b/c.txt` is synced to `[target]/a/b/c.txt`. This means that you can safely use these paths as Docker volumes without modifying the volume paths specified in the `docker-compose.yml` file used in development.\n\n## `ssh-port`\n\nThe SSH port (e.g., 22) to use for connecting to the server.\n\n## `ssh-private-key`\n\nThe private key generated on the server, used to authenticate the SSH connection.\n\n**Default**: `'/tmp/ssh_agent.sock'`\n\n## `command`\n\nThe command to run on the server (through an SSH connection) to deploy the new container(s).\n\n## Example usage\n\n```yaml\n---\nuses: iacobfred/deploy-docker-ssh@v1\nwith:\n  host: \"server.com\"\n  user: \"jacob\"\n  target: /var/www/server.com'\n  files: |\n    .env\n    docker-compose.yml\n    .config/nginx.conf\n  ssh-port: \"22\"\n  ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}\n  command: |\n    set -a \u0026\u0026 source .env \u0026\u0026 set +a \u0026\u0026\n    echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin \u0026\u0026\n    docker compose pull \u0026\u0026 docker compose up -d \u0026\u0026\n    if [ $RELOAD_WEBSERVER = true ]; then echo 'Reloading webserver...'; nginx -s reload; fi;\n    docker system prune -f\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobjove%2Fdeploy-docker-ssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobjove%2Fdeploy-docker-ssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobjove%2Fdeploy-docker-ssh/lists"}