From e2e11eab3110fea943d58fa6de7e396b715539bb Mon Sep 17 00:00:00 2001 From: bishsh Date: Mon, 19 Jan 2026 20:39:49 +0800 Subject: [PATCH] Update deployment process in GitHub Actions workflow Removed SSH action for server pull command and replaced with a direct curl command for deployment. --- .github/workflows/main.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc2529c..dfc3522 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,18 +64,7 @@ jobs: git add . git commit -m "${{ github.event.head_commit.message }}··[$(date +"%Z %Y-%m-%d %A %H:%M:%S")]" git push --force --quiet "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" master:page - - - name: 服务器执行拉取命令 - uses: appleboy/ssh-action@v1 - with: - host: ${{ secrets.SERVER_IP }} - username: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} - port: ${{ secrets.PORT }} - script: | - cd /opt/www/sites/blog/index/ - git config --global --add safe.directory "$(pwd)" - git fetch --all --depth=1 - git reset --hard origin/page - git pull --depth=1 - echo "✅ 已拉取 page 分支最新内容" + + - name: Deploy to Server + run: | + curl -X POST "https://45.145.229.95:40606/hook?access_key=1XJG8IvYTSZVvD5dpm86GYIpQxgxBcucULnX1MFskZSKayXU"