diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index dc46045..ae5d627 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -28,8 +28,16 @@ jobs: with: extra-packages: pkgdown - - name: Deploy package - run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs + git-config-name: ${{ github.actor }} + git-config-email: ${{ github.actor }}@users.noreply.github.com