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
This commit is contained in:
parent
ed5b1f5f53
commit
465578f36c
30
.github/workflows/main.yml
vendored
30
.github/workflows/main.yml
vendored
@ -20,6 +20,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v2
|
- 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
|
# - name: Copy folder content recursively to remote
|
||||||
# uses: ThomasRutzer/github-action-scp@master
|
# uses: ThomasRutzer/github-action-scp@master
|
||||||
# with:
|
# with:
|
||||||
@ -29,13 +39,13 @@ jobs:
|
|||||||
# username: ${{ secrets.CI_USER }}
|
# username: ${{ secrets.CI_USER }}
|
||||||
# password: ${{ secrets.CI_PASSWORD }}
|
# password: ${{ secrets.CI_PASSWORD }}
|
||||||
# rmRemote: true
|
# rmRemote: true
|
||||||
- name: copy file via ssh password
|
# - name: copy file via ssh password
|
||||||
uses: appleboy/scp-action@master
|
# uses: appleboy/scp-action@master
|
||||||
with:
|
# with:
|
||||||
host: "server.chuckdries.com"
|
# host: "server.chuckdries.com"
|
||||||
username: ${{ secrets.CI_USER }}
|
# username: ${{ secrets.CI_USER }}
|
||||||
password: ${{ secrets.CI_PASSWORD }}
|
# password: ${{ secrets.CI_PASSWORD }}
|
||||||
# port: ${{ secrets.PORT }}
|
# # port: ${{ secrets.PORT }}
|
||||||
source: "index.html"
|
# source: "index.html"
|
||||||
target: "/docker-services/letsencrypt/www"
|
# target: "/docker-services/letsencrypt/www"
|
||||||
rm: true
|
# rm: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user