33 lines
903 B
YAML
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"
|