瀏覽代碼

documentation update

milan jurkulák 2 年之前
父節點
當前提交
41127723c5
共有 1 個文件被更改,包括 7 次插入 和 0 次删除
  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