Including publications #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pkgdown | |
| on: | |
| push: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pkgdown: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure GitHub Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| use-public-rspm: true | |
| - name: Set up Pandoc | |
| uses: r-lib/actions/setup-pandoc@v2 | |
| - name: Install dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| needs: website | |
| extra-packages: | | |
| any::pkgdown | |
| any::rmarkdown | |
| any::knitr | |
| cache-version: 2 | |
| - name: Install package | |
| run: R CMD INSTALL . | |
| - name: Build pkgdown site | |
| run: | | |
| pkgdown::build_site_github_pages( | |
| new_process = FALSE, | |
| install = FALSE | |
| ) | |
| shell: Rscript {0} | |
| - name: Upload site artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs | |
| deploy: | |
| needs: pkgdown | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |