Browse Source

documentation update

milan jurkulák 2 năm trước cách đây
mục cha
commit
41127723c5
1 tập tin đã thay đổi với 7 bổ sung và 0 xóa
  1. 7 0
      scripts/update-wiki.sh

+ 7 - 0
scripts/update-wiki.sh

@@ -24,6 +24,13 @@ echo "Cloning wiki repo https://github.com/$GITHUB_REPOSITORY.wiki.git"
 #
 git clone "https://$GITHUB_ACTOR:$GH_TOKEN@github.com/$GITHUB_REPOSITORY.wiki.git" "$TEMP_REPO_DIR"
 # Copy wikis
+echo "Removing old wiki"
+old_dir=$(pwd)
+cd "$TEMP_REPO_DIR" || exit
+git rm -rf .
+git clean -fxd
+git update-ref -d refs/heads/master
+cd "$old_dir" || exit
 echo "Copying edited wiki"
 cp -a "$WIKI_DIR/." "$TEMP_REPO_DIR"
 # Get commit details