From 7e62b51e322360d02531b96760b3b8a12c126fee Mon Sep 17 00:00:00 2001 From: Steven Agyekum Date: Fri, 27 Dec 2019 16:37:44 +0100 Subject: [PATCH] Update README.md --- README.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3e1a840..32f630d 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,6 @@ jobs: Advanced: ``` -name: DEPLOY -on: - push: - branches: - - master - jobs: deploy: runs-on: ubuntu-latest @@ -91,12 +85,6 @@ jobs: For better security, I suggest you create additional secrets for remote_host, remote_port and remote_user inputs. ``` -name: DEPLOY -on: - push: - branches: - - master - jobs: deploy: runs-on: ubuntu-latest @@ -114,6 +102,28 @@ jobs: remote_key: ${{ secrets.DEPLOY_KEY }} ``` +For maximum speed limit the checkout action (``actions/checkout@v1``) to a depth of 1: + +``` +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: rsync deployments + uses: burnett01/rsync-deployments@3.0 + with: + switches: -avzr --delete + path: src/ + remote_path: /var/www/html/ + remote_host: ${{ secrets.DEPLOY_HOST }} + remote_port: ${{ secrets.DEPLOY_PORT }} + remote_user: ${{ secrets.DEPLOY_USER }} + remote_key: ${{ secrets.DEPLOY_KEY }} +``` + --- ## Version 2.0