File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,15 @@ jobs:
12
12
uses : actions/checkout@v2
13
13
with :
14
14
ref : gh-pages
15
-
16
- - name : Delete preview and history
15
+ - name : Delete preview and history + push changes
17
16
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})
17
+ if [ -d "previews/PR$PRNUM" ]; then
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})
23
+ git push --force origin gh-pages-new:gh-pages
24
+ fi
23
25
env :
24
26
PRNUM : ${{ github.event.number }}
25
-
26
- - name : Push changes
27
- run : |
28
- git push --force origin gh-pages-new:gh-pages
You can’t perform that action at this time.
0 commit comments