Files
wiki/.gitea/workflows/deploy.yml
T
zdh a0b8716cf8
Deploy Wiki to Production / deploy (push) Failing after 1m30s
fix: deploy to /data/wiki instead of /data
2026-06-04 15:08:41 +08:00

33 lines
903 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/wiki/
- name: Reload nginx
run: |
sshpass -p "${{ secrets.DEPLOY_PASSWORD }}" ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} "nginx -s reload"