File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 97
97
- name : Commit and Push
98
98
if : ${{ github.event_name == 'push' && steps.check-rmd.outputs.count != 0 && github.ref != 'refs/heads/gh-pages'}}
99
99
run : |
100
+ # clean up gh-pages
101
+ cd gh-pages
102
+ git rm -rf . # remove all previous files
103
+ git restore --staged . # remove things from the stage
104
+ cd ..
100
105
# copy everything into gh-pages site
101
106
cp -r `ls -A | grep -v 'gh-pages' | grep -v '.git' | grep -v '.bundle/' | grep -v '_site'` gh-pages
102
107
# move into gh-pages, add, commit, and push
@@ -105,7 +110,7 @@ jobs:
105
110
git config --local user.email "actions@github.com"
106
111
git config --local user.name "GitHub Actions"
107
112
git add -A .
108
- git commit --allow-empty -m "[Github Actions] render website (via ${{ github.sha }}"
113
+ git commit --allow-empty -m "[Github Actions] render website (via ${{ github.sha }}) "
109
114
git push origin gh-pages
110
115
# return
111
116
cd ..
You can’t perform that action at this time.
0 commit comments