diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index fc08b084..cb67828c 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -97,6 +97,11 @@ jobs: - name: Commit and Push if: ${{ github.event_name == 'push' && steps.check-rmd.outputs.count != 0 && github.ref != 'refs/heads/gh-pages'}} run: | + # clean up gh-pages + cd gh-pages + git rm -rf . # remove all previous files + git restore --staged . # remove things from the stage + cd .. # copy everything into gh-pages site cp -r `ls -A | grep -v 'gh-pages' | grep -v '.git' | grep -v '.bundle/' | grep -v '_site'` gh-pages # move into gh-pages, add, commit, and push @@ -105,7 +110,7 @@ jobs: git config --local user.email "actions@github.com" git config --local user.name "GitHub Actions" git add -A . - git commit --allow-empty -m "[Github Actions] render website (via ${{ github.sha }}" + git commit --allow-empty -m "[Github Actions] render website (via ${{ github.sha }})" git push origin gh-pages # return cd ..