File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,19 @@ jobs:
2121
2222 - name : Switch to jupyterbook branch
2323 run : |
24- if git rev-parse --verify origin/ jupyterbook; then
24+ if git ls-remote --exit-code --heads origin jupyterbook; then
2525 git checkout jupyterbook
2626 else
2727 echo "Branch 'jupyterbook' does not exist. Creating it..."
2828 git checkout -b jupyterbook
29+ git push -u origin jupyterbook
2930 fi
3031
32+ - name : Ensure clean branch state
33+ run : |
34+ git reset --hard origin/jupyterbook
35+ git clean -fd
36+
3137 - name : Sync files from main branch
3238 run : |
3339 git checkout main -- data figures notebooks
8490 run : |
8591 git add _toc.yml
8692 git commit -m "Sync files and update _toc.yml" || echo "No changes to commit"
87- git push origin jupyterbook
93+ git push origin jupyterbook || git push origin jupyterbook --force
You can’t perform that action at this time.
0 commit comments