fix actions AGAIN

This commit is contained in:
informaticker 2024-11-03 23:29:14 +01:00
parent 3b4f32c70b
commit 2358b4dd83

View File

@ -5,12 +5,13 @@ jobs:
deploy:
runs-on: ubuntu-latest
container:
image: eeacms/rsync
image: alpine
steps:
- name: Install git
- name: Install git and openssh
run: |
apk add --no-cache git
which rsync
apk add --no-cache git openssh-client
- name: Checkout code
uses: actions/checkout@v3
- name: Setup SSH
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@ -26,12 +27,10 @@ jobs:
HOST1: ${{ secrets.HOST1 }}
USER: ${{ secrets.USER }}
run: |
echo "Removing old website..."
ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*'
echo "Deploying new website..."
/usr/bin/rsync -avz --delete \
--exclude '.git*' \
./ $USER@$HOST1:/var/www/elia.network/html/
scp -r \
$(ls -A | grep -v '.git') \
$USER@$HOST1:/var/www/elia.network/html/
- name: Reload Nginx
env:
HOST1: ${{ secrets.HOST1 }}