nows/.github/workflows/deploy.yml
Zichao Lin 217c8f1af3
Some checks failed
Deploy / deploy (push) Failing after 10s
add workflow
2023-11-25 19:34:46 +08:00

20 lines
408 B
YAML

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"