From 657315554db7edc835dd57aa969c87915a727713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9ginal=20Exavier?= Date: Fri, 3 May 2024 11:26:44 -0300 Subject: [PATCH] Update pkgdown.yaml --- .github/workflows/pkgdown.yaml | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index a7276e8..cd8fcd7 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -3,24 +3,15 @@ on: push: branches: [main, master] - pull_request: - branches: [main, master] - release: - types: [published] - workflow_dispatch: + tags: ['*'] name: pkgdown jobs: pkgdown: runs-on: ubuntu-latest - # Only restrict concurrency for non-PR jobs - concurrency: - group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - permissions: - contents: write steps: - uses: actions/checkout@v4 @@ -32,17 +23,12 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::pkgdown, local::. + extra-packages: pkgdown needs: website - - 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.5.0 - with: - clean: false - branch: gh-pages - folder: docs + - 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)' +