Skip to content

Commit

Permalink
Update pkgdown Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsnow committed Jul 14, 2023
1 parent 0299012 commit a8c5a4d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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'

0 comments on commit a8c5a4d

Please sign in to comment.