Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzhizhia committed Jan 5, 2025
1 parent 6049db5 commit 9aae131
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/deploy-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,18 @@ jobs:
git commit -m "Initial public branch from main ${COMMIT_HASH}"
git push origin public
else
# 保存构建产物到临时目录
mv public temp_public
# 更新现有 public 分支
git fetch origin public
git checkout public --
git checkout public
git reset --soft origin/public
rm -rf ./*
# 确保 public 目录存在
if [ ! -d "public" ]; then
echo "Error: public directory not found"
echo "Current directory contents:"
ls -la
exit 1
fi
# 复制文件
cp -r public/* .
# 清理并复制文件
rm -rf ./*
mv temp_public/* .
rm -rf temp_public
git add .
Expand Down

0 comments on commit 9aae131

Please sign in to comment.