From a8c5a4dcf78ccf32867d020d02b1dbf1fc8f0afe Mon Sep 17 00:00:00 2001 From: Dan Snow Date: Fri, 14 Jul 2023 13:20:09 -0500 Subject: [PATCH] Update pkgdown Actions workflow --- .github/workflows/pkgdown.yaml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index e9dd857..73d6daa 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,5 +1,3 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: workflow_dispatch: pull_request: @@ -18,18 +16,7 @@ jobs: needs: prepare-ptaxsim runs-on: ubuntu-latest env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} PTAXSIM_DB_PATH: ${{ github.workspace }}/ptaxsim.db - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - concurrency: - group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} - cancel-in-progress: false - permissions: - contents: read - pages: write - id-token: write steps: - uses: actions/checkout@v3 @@ -61,6 +48,17 @@ jobs: run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} + deploy: + needs: pkgdown + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + contents: read + pages: write + id-token: write + steps: - name: Configure pages uses: actions/configure-pages@v3 @@ -72,3 +70,4 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 + if: contains(fromJSON('["main", "master"]'), github.ref_name) && github.event_name != 'pull_request'