Files
wiki/.gitea/workflows/deploy.yml
T
zdh fb82f91e43
Deploy Wiki to Production / deploy (push) Failing after 1m30s
ci: add auto-deploy workflow on push to main
2026-06-04 15:03:49 +08:00

33 lines
898 B
YAML

name: Deploy Wiki to Production
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install sshpass
run: apt-get update -qq && apt-get install -y -qq sshpass
- name: Deploy to server
run: |
sshpass -p "${{ secrets.DEPLOY_PASSWORD }}" rsync -avz \
--exclude='.git' \
--exclude='.claude' \
--exclude='.gitea' \
--exclude='.gitignore' \
--exclude='CLAUDE.md' \
--exclude='*.pptx' \
--exclude='*.xlsx' \
--delete \
./ ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/data/
- name: Reload nginx
run: |
sshpass -p "${{ secrets.DEPLOY_PASSWORD }}" ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} "nginx -s reload"