From 465578f36cc73ad85c3547ace6d0c5fcd91f9b8a Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Wed, 29 Jul 2020 11:25:52 -0700 Subject: [PATCH] switch to rsync for deployment action - scp-action action requires write permission in parent dir - github-action-scp works, but I realize I don't think I want to copy the whole directory every time --- .github/workflows/main.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4829e89..2b30a74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,16 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + - name: Deploy to server via rsync + uses: trendyminds/github-actions-rsync@master + with: + RSYNC_OPTIONS: -avzr --delete --exclude node_modules --exclude '.git*' + RSYNC_TARGET: /docker-services/letsencrypt/www + RSYNC_SOURCE: ./ + env: + SSH_PRIVATE_KEY: ${{secrets.CI_SSH_KEY}} + SSH_USERNAME: ${{secrets.CI_USER}} + SSH_HOSTNAME: server.chuckdries.com # - name: Copy folder content recursively to remote # uses: ThomasRutzer/github-action-scp@master # with: @@ -29,13 +39,13 @@ jobs: # username: ${{ secrets.CI_USER }} # password: ${{ secrets.CI_PASSWORD }} # rmRemote: true - - name: copy file via ssh password - uses: appleboy/scp-action@master - with: - host: "server.chuckdries.com" - username: ${{ secrets.CI_USER }} - password: ${{ secrets.CI_PASSWORD }} -# port: ${{ secrets.PORT }} - source: "index.html" - target: "/docker-services/letsencrypt/www" - rm: true +# - name: copy file via ssh password +# uses: appleboy/scp-action@master +# with: +# host: "server.chuckdries.com" +# username: ${{ secrets.CI_USER }} +# password: ${{ secrets.CI_PASSWORD }} +# # port: ${{ secrets.PORT }} +# source: "index.html" +# target: "/docker-services/letsencrypt/www" +# rm: true