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 50994dd
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
on:
workflow_dispatch:
pull_request:
branches: [main, master]
push:
branches: [main, master]
release:
Expand All @@ -18,14 +19,19 @@ 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
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: write
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -57,10 +63,15 @@ 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]
- name: Configure 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 50994dd

Please sign in to comment.