File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,15 @@ jobs:
15
15
16
16
- name : Delete preview and history
17
17
run : |
18
- git config user.name "Documenter.jl"
19
- git config user.email "[email protected] "
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 "[email protected] "
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
23
26
env :
24
- PRNUM : ${{ github.event.number }}
27
+ DIR : " previews/PR ${{ github.event.number }}"
25
28
26
- - name : Push changes
27
- run : |
28
- git push --force origin gh-pages-new:gh-pages
29
-
30
29
# Workflow copied from https://github.com/CliMA/TimeMachine.jl
You can’t perform that action at this time.
0 commit comments