{"id":13474566,"url":"https://github.com/maxheld83/rsync","last_synced_at":"2025-04-15T11:33:15.709Z","repository":{"id":52037296,"uuid":"167790121","full_name":"maxheld83/rsync","owner":"maxheld83","description":"In the process of being transitioned to a node.js action.","archived":false,"fork":false,"pushed_at":"2019-03-14T16:36:45.000Z","size":34,"stargazers_count":53,"open_issues_count":6,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-16T06:01:17.846Z","etag":null,"topics":["bash","bash-script","deployment","github-action","github-actions","rsync","ssh"],"latest_commit_sha":null,"homepage":"https://www.maxheld.de/rsync/","language":"Shell","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/maxheld83.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":null,"security":null,"support":null}},"created_at":"2019-01-27T09:14:19.000Z","updated_at":"2024-08-16T06:01:17.847Z","dependencies_parsed_at":"2022-09-02T18:32:27.496Z","dependency_job_id":null,"html_url":"https://github.com/maxheld83/rsync","commit_stats":null,"previous_names":["maxheld83/ghaction-rsync"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Frsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Frsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Frsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxheld83%2Frsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxheld83","download_url":"https://codeload.github.com/maxheld83/rsync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223673050,"owners_count":17183618,"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":["bash","bash-script","deployment","github-action","github-actions","rsync","ssh"],"created_at":"2024-07-31T16:01:13.226Z","updated_at":"2024-11-08T11:03:24.481Z","avatar_url":"https://github.com/maxheld83.png","language":"Shell","funding_links":[],"categories":["Community Resources"],"sub_categories":["Deployment"],"readme":"# GitHub Action for Deploying via `rsync` Over `ssh`\n\n[![Actions Status](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/badge/maxheld83/rsync)](https://github.com/maxheld83/rsync/actions)\n[![GitHubActions](https://img.shields.io/badge/as%20seen%20on%20-GitHubActions-blue.svg)](https://github-actions.netlify.com/rsync)\n[![View Action](https://img.shields.io/badge/view-action-blue.svg)](https://github.com/marketplace/actions/rsync-deploy)\n\nSometimes, you might want to use `rsync` inside GitHub actions, such as for deploying static assets to some old school webserver over ssh.\nThis is your action.\n\nIt allows you to transfer files *from* your working directory (`/github/workspace`) *to* some server using `rsync` over `ssh`.\nHelpfully, `/github/workspace` includes a copy of your repository *source*, as well as any build artefacts left behind by previous workflow steps (= other actions you ran before).\n\n\n## Disclaimer\n\nGitHub actions is still [in limited public beta](https://github.com/features/actions) and advises against [usage in production](https://developer.github.com/actions/).\n\nThis action requires ssh private keys (see secrets), and **may thus be vulnerable**.\nThe ssh authentification **may need improvement** (see [issues](https://github.com/maxheld83/rsync/)).\n\n\n## Secrets\n\nThis action requires two secrets to authenticate over ssh:\n\n- `SSH_PRIVATE_KEY`\n- `SSH_PUBLIC_KEY`\n\nYou get both of these from the server you interact with.\n\nRemember to never commit these keys, but [provide them through the GitHub UI](https://developer.github.com/actions/creating-workflows/storing-secrets/) (repository settings/secrets).\n\n\n## Environment Variables\n\nThis action requires three environment variables used to register the target server in `$HOME/.ssh/known_hosts`.\nThis is to make sure that the action is talking to a trusted server.\n\n**`known_hosts` verification currently fails and is overriden, see [issue 1](https://github.com/maxheld83/rsync/issues/1)**.\n\n- `HOST_NAME` (the name of the server you wish to deploy to, such as `foo.example.com`)\n- `HOST_IP` (the IP of the server you wish to deploy to, such as `111.111.11.111`)\n- `HOST_FINGERPRINT` (the fingerprint of the server you wish to deploy to, can have different formats)\n\nThe `HOST_NAME` is *also* used in the below required arguments.\n\n\n## Required Arguments\n\n`rsync` requires:\n\n- `SRC`: source directory, relative path *from* `/github/workspace`\n- `[USER@]HOST::DEST`: target user (optional), target server, and directory from root *on* that target server. \n  Remember you can reuse the environment variable `$HOST_NAME`.\n\nFor action `rsync` options, see `entrypoint.sh` in the source.\nFor more options and documentation on `rsync`, see [https://rsync.samba.org](https://rsync.samba.org).\n\n\n## Example Usage\n\n```\naction \"Deploy with rsync\" {\n  uses = \"maxheld83/rsync@v0.1.1\"\n  needs = \"Write sha\"\n  secrets = [\n    \"SSH_PRIVATE_KEY\",\n    \"SSH_PUBLIC_KEY\"\n  ]\n  env = {\n    HOST_NAME = \"foo.example.com\"\n    HOST_IP = \"111.111.11.111\"\n    HOST_FINGERPRINT = \"ecdsa-sha2-nistp256 AAAA...\"\n  }\n  args = [\n    \"$GITHUB_WORKSPACE/index.html\",\n    \"alice@$HOST_NAME:path/to/destination\"\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxheld83%2Frsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxheld83%2Frsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxheld83%2Frsync/lists"}