File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,15 @@ jobs:
1515
1616 - name : Delete preview and history
1717 run : |
18- git config user.name "Documenter.jl"
19- git config user.email "documenter@juliadocs.github.io"
20- git rm -rf "previews/PR$PRNUM"
21- git commit -m "delete preview"
22- git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
18+ if [ -d "$DIR" ]; then
19+ git config user.name "Documenter.jl"
20+ git config user.email "documenter@juliadocs.github.io"
21+ git rm -rf "$DIR"
22+ git commit -m "delete preview"
23+ git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
24+ git push --force origin gh-pages-new:gh-pages
25+ fi
2326 env :
24- PRNUM : ${{ github.event.number }}
27+ DIR : " previews/PR ${{ github.event.number }}"
2528
26- - name : Push changes
27- run : |
28- git push --force origin gh-pages-new:gh-pages
29-
3029# Workflow copied from https://github.com/CliMA/TimeMachine.jl
You can’t perform that action at this time.
0 commit comments