fix actions AGAIN
This commit is contained in:
parent
3b4f32c70b
commit
2358b4dd83
@ -5,12 +5,13 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: eeacms/rsync
|
image: alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Install git
|
- name: Install git and openssh
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache git
|
apk add --no-cache git openssh-client
|
||||||
which rsync
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
@ -26,12 +27,10 @@ jobs:
|
|||||||
HOST1: ${{ secrets.HOST1 }}
|
HOST1: ${{ secrets.HOST1 }}
|
||||||
USER: ${{ secrets.USER }}
|
USER: ${{ secrets.USER }}
|
||||||
run: |
|
run: |
|
||||||
echo "Removing old website..."
|
|
||||||
ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*'
|
ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*'
|
||||||
echo "Deploying new website..."
|
scp -r \
|
||||||
/usr/bin/rsync -avz --delete \
|
$(ls -A | grep -v '.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