update workflow

This commit is contained in:
Zichao Lin 2023-11-25 19:38:12 +08:00
parent 6f07067c15
commit 182fef84bb
Signed by: earthjasonlin
GPG Key ID: 406D9913DE2E42FB

@ -11,9 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install sshpass
run: apt-get install -y sshpass
- name: Install
run: apt-get install -y expect
- name: Deploy to /www
- name: Deploy
run: |
sshpass -p ${{ secrets.PASSWORD }} ssh -o StrictHostKeyChecking=no ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd ${{ secrets.PATH }} && git pull"
expect - <<EOF
spawn ssh ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd ${{ secrets.PATH }} && git pull"
expect "password:"
send "${{ secrets.PASSWORD }}\r"
expect eof
EOF