Skip to content

Commit

Permalink
Deploy pkgdown to GH pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsnow committed Jul 4, 2023
1 parent ede903d commit d813ac3
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@
on:
workflow_dispatch:
pull_request:
branches: [main, master]
push:
branches: [main, master]
release:
types: [published]

name: pkgdown

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
cancel-in-progress: false

jobs:
prepare-ptaxsim:
uses: ./.github/workflows/prepare-ptaxsim.yaml
Expand All @@ -18,9 +28,6 @@ jobs:
pkgdown:
needs: prepare-ptaxsim
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 }}
PTAXSIM_DB_PATH: ${{ github.workspace }}/ptaxsim.db
Expand Down Expand Up @@ -57,10 +64,25 @@ jobs:
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/[email protected]
deploy:
needs: pkgdown
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
clean: false
branch: gh-pages
folder: docs
path: 'docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit d813ac3

Please sign in to comment.