feat(docs): update deployment workflow to prepare target directory and upload documentation

This commit is contained in:
shiyu
2025-06-09 13:12:52 +08:00
parent a869ff1954
commit e6fac3d31d

View File

@@ -28,7 +28,7 @@ jobs:
working-directory: ./Docs
run: bun run docs:build
- name: Deploy to server
- name: Prepare target directory on server
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
@@ -39,5 +39,13 @@ jobs:
script: |
mkdir -p /opt/1panel/www/sites/foxel.cc/index
rm -rf /opt/1panel/www/sites/foxel.cc/index/*
- name: Upload documentation to server
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
source: "Docs/.vitepress/dist/*"
target: "/opt/1panel/www/sites/foxel.cc/index"
target: "/opt/1panel/www/sites/foxel.cc/index"