https://github.com/shsharkar/laravel-rsync-deploy
Deploy Laravel developed project with Rsync. (GitHub Action)
https://github.com/shsharkar/laravel-rsync-deploy
Last synced: 6 months ago
JSON representation
Deploy Laravel developed project with Rsync. (GitHub Action)
- Host: GitHub
- URL: https://github.com/shsharkar/laravel-rsync-deploy
- Owner: SHSharkar
- Created: 2019-12-28T03:27:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-21T13:38:14.000Z (over 5 years ago)
- Last Synced: 2025-04-12T13:11:59.210Z (6 months ago)
- Language: Dockerfile
- Homepage: https://github.com/marketplace/actions/laravel-rsync-deploy
- Size: 27.3 KB
- Stars: 7
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[ Get more details at **codescene.io**.](https://codescene.io/projects/6753/jobs/latest-successful/results)
# Laravel Rsync Deploy
#### Deploy Laravel developed project with Rsync.
### Environment Variables
`SSH_PRIVATE_KEY` = Remote hosts SSH private key
`REMOTE_HOST` = Remote hosts IP address or domain
`REMOTE_HOST_PORT` = SSH remote host port number. e.g.: 22
`REMOTE_USER` = SSH login username. e.g.: root
`TARGET_DIRECTORY` = The target directory or path where the data will be synced. e.g.: ~/httpdocs
**Environment Variables Location**
[https://github.com/REPOSITORY_OWNER/REPOSITORY_NAME/settings/secrets](https://github.com/REPOSITORY_OWNER/REPOSITORY_NAME/settings/secrets)
### Usage
Example usage to `/.github/workflows/*.yml` file
```
- name: Laravel Rsync Deploy
uses: SHSharkar/Laravel-Rsync-Deploy@master
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "--ignore-times --compress --verbose --exclude=.git --exclude=.github --exclude=node_modules --no-perms --no-owner --no-group --recursive"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_HOST_PORT: ${{ secrets.REMOTE_HOST_PORT }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET_DIRECTORY: ${{ secrets.TARGET_DIRECTORY }}
```### Example usage in github workflow
```
name: Laravel Rsync Deployon:
push:
branches:
- masterjobs:
laravel-rsync-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2- uses: MilesChou/composer-action/7.3/install@master
- run: |
cp .env.example .env
php artisan key:generate --ansi- name: Pull Docker image
run: |
docker pull "node:lts-slim"
npm install && npm run production- name: Laravel Rsync Deploy
uses: SHSharkar/Laravel-Rsync-Deploy@master
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "--ignore-times --compress --verbose --exclude=.git --exclude=.github --exclude=node_modules --no-perms --no-owner --no-group --recursive"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_HOST_PORT: ${{ secrets.REMOTE_HOST_PORT }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET_DIRECTORY: ${{ secrets.TARGET_DIRECTORY }}
```