This repository has been archived on 2026-03-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
knowledge-base/.gitea/workflows/deploy.yml
T
Knowledge Base Agent a5ecd5e8c8
Deploy to Test / deploy (push) Failing after 4s
Fix: 使用本地runner标签
2026-02-28 00:58:06 +08:00

35 lines
937 B
YAML

name: Deploy to Test
on:
push:
branches:
- main
jobs:
deploy:
runs-on: [linux, amd64]
steps:
- name: Checkout code
run: |
echo "Checking out code..."
- name: Setup SSH password
run: |
mkdir -p ~/.ssh
echo "kb_admin:${{ secrets.SSH_PASSWORD }}" > ~/.ssh/passwd
chmod 600 ~/.ssh/passwd
ssh-keyscan -H micecola.top >> ~/.ssh/known_hosts
- name: Create remote directory
run: |
sshpass -f ~/.ssh/passwd ssh -o StrictHostKeyChecking=no kb_admin@micecola.top "mkdir -p /www/wwwroot/kb-web-test/zhangqing"
- name: Deploy to server
run: |
sshpass -f ~/.ssh/passwd rsync -avz --delete \
--exclude='.git' \
--exclude='.gitea' \
--exclude='*.pyc' \
--exclude='__pycache__' \
./ kb_admin@micecola.top:/www/wwwroot/kb-web-test/zhangqing/