{"id":18026383,"url":"https://github.com/d3rhase/rsync-deploy-action","last_synced_at":"2025-03-27T01:31:11.289Z","repository":{"id":65157557,"uuid":"458542050","full_name":"D3rHase/rsync-deploy-action","owner":"D3rHase","description":"Deploy files to remote server via rsync","archived":false,"fork":false,"pushed_at":"2024-12-06T02:01:18.000Z","size":29,"stargazers_count":5,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T21:05:11.129Z","etag":null,"topics":["action","deploy","deployment","github-actions","rsync"],"latest_commit_sha":null,"homepage":"","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/D3rHase.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-12T14:18:34.000Z","updated_at":"2024-12-17T16:13:48.000Z","dependencies_parsed_at":"2024-08-01T01:17:04.247Z","dependency_job_id":"4c525df7-0038-4e31-9da8-e19373ef3dc1","html_url":"https://github.com/D3rHase/rsync-deploy-action","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"5af3ec7ad17529c7c223819f54fe0d5cad1357e1"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D3rHase%2Frsync-deploy-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D3rHase%2Frsync-deploy-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D3rHase%2Frsync-deploy-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D3rHase%2Frsync-deploy-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/D3rHase","download_url":"https://codeload.github.com/D3rHase/rsync-deploy-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764647,"owners_count":20668455,"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":["action","deploy","deployment","github-actions","rsync"],"created_at":"2024-10-30T08:06:31.074Z","updated_at":"2025-03-27T01:31:10.425Z","avatar_url":"https://github.com/D3rHase.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this? / How to use?\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![Latest Release](https://img.shields.io/github/v/release/D3rHase/rsync-deploy-action?style=flat-square)\n\nThis is a GitHub Action designed to deploy files to a remote server using `rsync`. It allows you to easily transfer files from your github repository to a remote server, making it ideal for deployment scenarios.\n\n## Table of Contents\n\n- [Features](#features)\n- [Usage](#usage)\n  - [Action Example](#action-example)\n  - [Parameters](#parameters)\n  - [Secrets Configuration](#secrets-configuration)\n  - [Adding an SSH Key to your Server](#adding-an-ssh-key-to-your-server)\n- [How to implement in your workflow Example](#how-to-implement-in-your-workflow)\n- [License](#license)\n\n## Features\n\n- **Easy Setup**: Deploy files securely using SSH with minimal configuration.\n- **Efficient**: Utilizes `rsync` for fast and incremental file transfers.\n- **Customizable**: Allows you to specify paths, server configurations, and SSH keys.\n\n## Usage\n\n### Action example\n\nHere's a action example of how to use this `rsync-action`.\n\n\n\n```yaml\n    - name: Deploy files via rsync\n      uses: D3rHase/rsync-deploy-action@latest\n      with:\n        HOST: ${{ secrets.HOST }}\n        PORT: ${{ secrets.PORT }}\n        USER: ${{ secrets.USER }}\n        PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }}\n        REPOSITORY_PATH: 'path/to/your/files/in/repository/*'\n        SERVER_PATH: '/path/on/your/server/'\n\n```\n\n### Parameters\nYou can use plain text instead of the secrets for these values directly in your action, but it is highly recommended to use GitHub Secrets for sensitive information to ensure privacy and security. See [Secrets Configuration](#secrets-configuration).\n\n- `HOST`: The remote server address (IP or domain) - **Required**.\n- `PORT`: The port to connect to on the remote server - *Default: 22*.\n- `USER`: The username for SSH access - **Required**.\n- `PRIVATE_SSH_KEY`: The private SSH key to authenticate with the remote server - **Required**.\n- `REPOSITORY_PATH`: The path in your repository to the files/folders you wish to deploy - **Required**.\n- `SERVER_PATH`: The destination path on the remote server where files will be deployed - **Required**.\n\n## Secrets Configuration\n\nTo keep your credentials secure, store sensitive information like `HOST`, `PORT`, `USER`, and `PRIVATE_SSH_KEY` as [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets). You can add these secrets in your repository's settings under `Secrets and variables` \u003e `Actions` \u003e `Repository secrets`.\n\n## Adding an SSH Key to Your Server\n\nTo use this action, you'll need to set up an SSH key on your server. Here's how to do it:\n\n1. **Generate an SSH Key Pair** on your local machine (if you don't have one already):\n\n    ```sh\n    ssh-keygen -t rsa -b 4096\n    ```\n\n    This command creates a new SSH key using the RSA algorithm with a 4096-bit key length.\n\n2. **Add the SSH Key to the Server**:\n\n    Copy the public key (`~/.ssh/id_rsa.pub`) to your server using the `ssh-copy-id` command:\n\n    ```sh\n    ssh-copy-id user@your-server-ip\n    ```\n\n    Replace `user` with your server's username and `your-server-ip` with the IP address of your server. This command adds your public key to the `~/.ssh/authorized_keys` file on the server.\n\n3. **Test the SSH Connection**:\n\n    Verify that you can connect to your server using the SSH key:\n\n    ```sh\n    ssh user@your-server-ip\n    ```\n\n4. **Store the SSH Key in GitHub Secrets**:\n\n    Go to your repository on GitHub, navigate to `Settings` in your repository \u003e `Secrets and variables` \u003e `Actions`, and add a new repository secret named `PRIVATE_SSH_KEY`. Paste the contents of your private key (`~/.ssh/id_rsa`) into this secret.\n\n    **Note**: Ensure your private key remains confidential. Do not share it publicly.\n\n## How to implement in your workflow\n\nThis is an example of how you could use it in your GitHub workflow YAML file.\n\n```yaml\nname: Example workflow file\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Checkout code\n      uses: actions/checkout@v2\n\n    - name: Deploy files via rsync\n      uses: D3rHase/rsync-deploy-action@latest\n      with:\n        HOST: ${{ secrets.HOST }}\n        PORT: ${{ secrets.PORT }}\n        USER: ${{ secrets.USER }}\n        PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }}\n        REPOSITORY_PATH: 'path/to/your/files/in/repository/*'\n        SERVER_PATH: '/path/on/your/server/'\n\n    - name: Notify Deployment Success\n      run: echo \"Deployment to ${{ secrets.HOST }} completed successfully!\"\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3rhase%2Frsync-deploy-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd3rhase%2Frsync-deploy-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3rhase%2Frsync-deploy-action/lists"}