fix actions AGAIN
This commit is contained in:
parent
a754ecf1da
commit
e3f00a8874
@ -4,14 +4,14 @@ on: [push]
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: eeacms/rsync
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install git
|
||||||
|
run: |
|
||||||
|
apk add --no-cache git
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install rsync
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install rsync -y
|
|
||||||
which rsync # This will verify rsync location
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
@ -27,9 +27,8 @@ jobs:
|
|||||||
HOST1: ${{ secrets.HOST1 }}
|
HOST1: ${{ secrets.HOST1 }}
|
||||||
USER: ${{ secrets.USER }}
|
USER: ${{ secrets.USER }}
|
||||||
run: |
|
run: |
|
||||||
# First verify the remote directory exists
|
|
||||||
ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*'
|
ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*'
|
||||||
/usr/bin/rsync -avz --delete \
|
rsync -avz --delete \
|
||||||
--exclude '.git*' \
|
--exclude '.git*' \
|
||||||
./ $USER@$HOST1:/var/www/elia.network/html/
|
./ $USER@$HOST1:/var/www/elia.network/html/
|
||||||
- name: Reload Nginx
|
- name: Reload Nginx
|
||||||
|
Loading…
Reference in New Issue
Block a user