We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8df29b1 commit 0fcd867Copy full SHA for 0fcd867
.github/workflows/build.yml
@@ -33,9 +33,18 @@ jobs:
33
BRANCH=$(echo ${GITHUB_REF} | sed -e 's/refs\/heads\///')
34
TARGET_BRANCH="build/${BRANCH}"
35
COMMIT_MSG=$(git log -1 --pretty=%B)
36
+
37
+ if git ls-remote --heads origin ${TARGET_BRANCH} | grep ${TARGET_BRANCH}; then
38
+ git push origin --delete
39
+ fi
40
41
+ find . -mindepth 1 -maxdepth 1 ! -name 'docs' ! -name '.git' -exec rm -rf {} +
42
+ find docs -mindepth 1 -maxdepth 1 ! -name '.vitepress' -exec rm -rf {} +
43
+ cp -r docs/.vitepress/docs/* .
44
+ rm -rf docs/.vitepress/docs
45
46
git checkout -b "${TARGET_BRANCH}"
- git add -f docs/.vitepress/dist
47
+ git add .
48
git commit -m "${COMMIT_MSG}"
49
50
echo "Branch: ${BRANCH}"
0 commit comments