fix actions AGAIN
This commit is contained in:
parent
f3edcc0b8c
commit
a754ecf1da
@ -9,8 +9,9 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: |
|
run: |
|
||||||
apt update
|
sudo apt-get update
|
||||||
apt-get install rsync -y
|
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 }}
|
||||||
@ -21,17 +22,16 @@ jobs:
|
|||||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
ssh-keyscan -H $HOST1 >> ~/.ssh/known_hosts
|
ssh-keyscan -H $HOST1 >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: Deploy to first host
|
- name: Deploy to first host
|
||||||
env:
|
env:
|
||||||
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/*'
|
||||||
rsync -avz --delete \
|
/usr/bin/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
|
||||||
env:
|
env:
|
||||||
HOST1: ${{ secrets.HOST1 }}
|
HOST1: ${{ secrets.HOST1 }}
|
||||||
|
Loading…
Reference in New Issue
Block a user