Skip to content

Commit cfb4176

Browse files
committed
maybe
1 parent 77a7ee5 commit cfb4176

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

.github/workflows/build_docs.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232

3333
- name: Build the documentation
3434
run: |
35+
36+
git checkout --orphan gh-pages
3537
# Generate reStructuredText files from the source code
3638
sphinx-apidoc -o sphinx/ contourusv/ -f
3739
@@ -54,12 +56,6 @@ jobs:
5456
git config --global user.email "[email protected]"
5557
git config --global user.name "Dallas Wade"
5658
git config --global pull.rebase false # Or true, or --ff-only based on your preference
57-
58-
git add docs/
59-
git commit -m "Updated docs"
60-
61-
# Ensure gh-pages branch exists and switch to it
62-
git checkout --orphan gh-pages
6359
6460
# Ensure docs/ is staged properly
6561
git add docs/
@@ -68,11 +64,4 @@ jobs:
6864
6965
# Push the changes
7066
git push origin gh-pages --force
71-
72-
# Switch back to main and remove docs from the main branch
73-
git checkout main
74-
rm -rf docs/
75-
git add -A
76-
git commit -m "Remove docs folder from main branch" || echo "No changes to commit."
77-
git push origin main
7867

0 commit comments

Comments
 (0)