mirror of https://github.com/elunez/eladmin
push master
parent
3ef96bbd73
commit
e68c1baaf5
|
@ -29,6 +29,7 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
needs: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -45,7 +46,9 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
|
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
sshpass -p "$SSH_PASSWORD" ssh root@172.235.32.135 "cd backend && \
|
# Using -o options to handle first-time connection and avoid strict host checking
|
||||||
|
export SSHPASS="$SSH_PASSWORD"
|
||||||
|
sshpass -e ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@172.235.32.135 "cd backend && \
|
||||||
pkill -f 'java -jar' || true && \
|
pkill -f 'java -jar' || true && \
|
||||||
git pull && \
|
git pull && \
|
||||||
./mvnw clean package && \
|
./mvnw clean package && \
|
||||||
|
|
Loading…
Reference in New Issue