This repository was archived by the owner on Mar 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 66
77jobs :
88 docs :
9+ if : github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
910 strategy :
1011 fail-fast : false
1112 matrix :
Original file line number Diff line number Diff line change 77 workflow_dispatch :
88 inputs :
99 version :
10- description : " documentation version"
10+ description : " documentation version to DELETE "
1111 required : true
1212 type : string
1313
@@ -20,12 +20,22 @@ jobs:
2020 - name : checkout
2121 uses : actions/checkout@v2
2222 with :
23- branch : gh-pages
23+ ref : gh-pages
2424
2525 - name : removing documentation for branch ${{ github.event.ref }}
2626 if : ${{ github.event_name != 'workflow_dispatch' }}
27- run : echo rm -r .github/pages/ ${{ github.event.ref }}
27+ run : echo "remove_me= ${{ github.event.ref }}" >> $GITHUB_ENV
2828
2929 - name : manually removing documentation version ${{ github.event.inputs.version }}
3030 if : ${{ github.event_name == 'workflow_dispatch' }}
31- run : echo rm -r .github/pages/${{ github.event.inputs.version }}
31+ run : echo "remove_me=${{ github.event.inputs.version }}" >> $GITHUB_ENV
32+
33+ - name : update index and push changes
34+ run : |
35+ echo removing redundant documentation version ${{ env.remove_me }}
36+ rm -r ${{ env.remove_me }}
37+ sed -i /${{ env.remove_me }}/d versions.txt
38+ git config --global user.name 'GitHub Actions Docs Cleanup CI'
39+ git config --global user.email '[email protected] ' 40+ git commit -am"removing redundant docs version ${{ env.remove_me }}"
41+ git push
You can’t perform that action at this time.
0 commit comments