Skip to content

Commit

Permalink
更新部署工作流,使用SSH克隆gh-pages分支以提高安全性
Browse files Browse the repository at this point in the history
  • Loading branch information
W1ndys committed Dec 31, 2024
1 parent 5e83b49 commit 545bb23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
echo "删除旧的 ${{ secrets.GH_REPO }} 目录"
rm -rf ${{ secrets.GH_REPO }}
echo "克隆 gh-pages 分支"
git clone --depth 1 -b gh-pages https://github.com/${{ secrets.GH_USERNAME }}/${{ secrets.GH_REPO }}.git
git clone --depth 1 -b gh-pages git@github.com:${{ secrets.GH_USERNAME }}/${{ secrets.GH_REPO }}.git
echo "删除旧的 index 目录"
rm -rf index
echo "移动克隆的仓库到 index 目录"
echo "移动克隆的仓库到 index 目录"
mv ${{ secrets.GH_REPO }} index
cd index
echo "删除 .git 目录"
Expand Down

0 comments on commit 545bb23

Please sign in to comment.