add workflow
Some checks failed
Deploy / deploy (push) Failing after 10s

This commit is contained in:
Zichao Lin 2023-11-25 19:34:46 +08:00
parent 0280256a9f
commit 217c8f1af3
Signed by: earthjasonlin
GPG Key ID: 406D9913DE2E42FB

19
.github/workflows/deploy.yml vendored Normal file

@ -0,0 +1,19 @@
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: Deploy to /www
run: |
sshpass -p ${{ secrets.PASSWORD }} ssh -o StrictHostKeyChecking=no ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd ${{ secrets.PATH }} && git pull"