diff --git a/.github/workflows/Build_gh-pages.yml b/.github/workflows/Build_gh-pages.yml index c13121c..7ebca5d 100644 --- a/.github/workflows/Build_gh-pages.yml +++ b/.github/workflows/Build_gh-pages.yml @@ -25,8 +25,14 @@ jobs: extra-packages: any::pkgdown, local::. needs: website + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + - name: Deploy to GitHub pages 🚀 - run: | - git config --local user.name "GitHub Actions" - git config --local user.email "actions@github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs