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 f63e05ea27
Deploy to Test / deploy (push) Failing after 0s
SSH部署到micecola.top
2026-02-28 17:23:46 +08:00

32 lines
809 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 key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H micecola.top >> ~/.ssh/known_hosts
- name: Deploy to server
run: |
ssh -o StrictHostKeyChecking=no root@micecola.top "mkdir -p /www/wwwroot/kb-web-test/zhangqing"
rsync -avz --delete \
--exclude='.git' \
--exclude='.gitea' \
--exclude='*.pyc' \
--exclude='__pycache__' \
./ root@micecola.top:/www/wwwroot/kb-web-test/zhangqing/