Skip to content

Commit 2cb9815

Browse files
committed
Update script to avoid conflicts switching branches
1 parent e4a7e9a commit 2cb9815

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

etc/generate-docs.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,18 @@ jazzy_args=(--clean
2828
modules=( BSON )
2929

3030
for module in "${modules[@]}"; do
31-
args=("${jazzy_args[@]}" --output "docs/${module}" --module "${module}"
31+
args=("${jazzy_args[@]}" --output "docs-temp/${module}" --module "${module}"
3232
--root-url "https://mongodb.github.io/swift-bson/docs/${module}/")
3333
jazzy "${args[@]}"
3434
done
3535

3636
# switch to docs branch to commit and push
3737
git checkout gh-pages
38+
39+
rm -rf docs/*
40+
cp -r docs-temp/* docs/
41+
rm -rf docs-temp
42+
3843
git add docs/
3944
git commit -m "${version} docs"
4045
git push

0 commit comments

Comments
 (0)