-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,55 @@ | ||
# action-sshpass-rsync | ||
# action-sshpass-rsync | ||
|
||
Github Action to deploy via rsync and sshpass | ||
in order to enable deployments on hosts, which don't support key based ssh | ||
|
||
## Usage | ||
```yml | ||
- name: Deploy to Server | ||
uses: inf166/action-sshpass-rsync@v1 | ||
with: | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
user: ${{ secrets.DEPLOY_USER }} | ||
port: ${{ secrets.DEPLOY_PORT }} | ||
pass: ${{ secrets.DEPLOY_PASS }} | ||
local: "path/of/your/local/mashine" | ||
remote: "path/where/to/deploy/to" | ||
runBeforeDeployment: | | ||
cd somewhere/ | ||
runAfterDeployment: | | ||
cd ../somewhere/back/to | ||
``` | ||
You can do something before and after your deployment on the remote. | ||
For this, you use the `runBeforeDeployment` and `runAfterDeployment` inputs. | ||
|
||
### Optional (and not firmly tested) | ||
|
||
You can use your private key and just enjoy the deployment part of this action. | ||
But I must say, that I have not tested this. | ||
Feel free to contribute. | ||
|
||
```yml | ||
- name: Deploy to Server | ||
uses: inf166/action-sshpass-rsync@v1 | ||
with: | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
user: ${{ secrets.DEPLOY_USER }} | ||
port: ${{ secrets.DEPLOY_PORT }} | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
local: "path/of/your/local/mashine" | ||
remote: "path/where/to/deploy/to" | ||
runBeforeDeployment: | | ||
cd somewhere/ | ||
runAfterDeployment: | | ||
cd ../somewhere/back/to | ||
``` | ||
|
||
## Disclaimer | ||
Parts of this action are heavily inspired by | ||
[matheusvanzan / sshpass-action](https://github.com/matheusvanzan/sshpass-action/) | ||
and | ||
[D3rHase / rsync-deploy-action](https://github.com/D3rHase/rsync-deploy-action). | ||
|
||
I have looked up how to make my own action there and build upon their code. | ||
So please give them some love. |