fix actions AGAIN

This commit is contained in:
informaticker 2024-11-03 23:24:15 +01:00
parent f3edcc0b8c
commit a754ecf1da

View File

@ -9,8 +9,9 @@ jobs:
uses: actions/checkout@v3
- name: Install rsync
run: |
apt update
apt-get install rsync -y
sudo apt-get update
sudo apt-get install rsync -y
which rsync # This will verify rsync location
- name: Setup SSH
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@ -21,17 +22,16 @@ jobs:
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H $HOST1 >> ~/.ssh/known_hosts
- name: Deploy to first host
env:
HOST1: ${{ secrets.HOST1 }}
USER: ${{ secrets.USER }}
run: |
# First verify the remote directory exists
ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*'
rsync -avz --delete \
/usr/bin/rsync -avz --delete \
--exclude '.git*' \
./ $USER@$HOST1:/var/www/elia.network/html/
- name: Reload Nginx
env:
HOST1: ${{ secrets.HOST1 }}