@@ -13,12 +13,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Checking out code..."
|
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
|
- name: Deploy to server
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /www/wwwroot/kb-web-test/zhangqing
|
ssh -o StrictHostKeyChecking=no root@micecola.top "mkdir -p /www/wwwroot/kb-web-test/zhangqing"
|
||||||
rsync -avz --delete \
|
rsync -avz --delete \
|
||||||
--exclude='.git' \
|
--exclude='.git' \
|
||||||
--exclude='.gitea' \
|
--exclude='.gitea' \
|
||||||
--exclude='*.pyc' \
|
--exclude='*.pyc' \
|
||||||
--exclude='__pycache__' \
|
--exclude='__pycache__' \
|
||||||
./ /www/wwwroot/kb-web-test/zhangqing/
|
./ root@micecola.top:/www/wwwroot/kb-web-test/zhangqing/
|
||||||
|
|||||||
Reference in New Issue
Block a user