File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1- name : Cleanup Doc Preview
1+ name : Doc Preview Cleanup
22
33on :
44 pull_request :
55 types : [closed]
66
77jobs :
8- cleanup- doc-preview :
8+ doc-preview-cleanup :
99 runs-on : ubuntu-latest
10+ permissions :
11+ contents : write
1012 steps :
1113 - name : Checkout gh-pages branch
12- uses : actions/checkout@v3
14+ uses : actions/checkout@v4
1315 with :
1416 ref : gh-pages
15- - name : Delete preview
17+ - name : Delete preview and history + push changes
1618 run : |
1719 if [ -d "previews/PR$PRNUM" ]; then
1820 git config user.name "Documenter.jl"
1921 git config user.email "[email protected] " 2022 git rm -rf "previews/PR$PRNUM"
21- git commit -m "delete preview for $PRNUM"
22- git push origin gh-pages:gh-pages
23+ git commit -m "delete preview"
24+ git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
25+ git push --force origin gh-pages-new:gh-pages
2326 fi
2427 env :
2528 PRNUM : ${{ github.event.number }}
2629
27- # adapted from here:
30+ # copied from here:
2831# https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#gh-pages-Branch
29- # without history cleanup
You can’t perform that action at this time.
0 commit comments