From f2a1b3e59b157f8a43cecb6f8df87838a8e85304 Mon Sep 17 00:00:00 2001 From: Malcolm Barrett Date: Fri, 15 Dec 2023 14:50:15 -0500 Subject: [PATCH] update pkgdown --- .github/workflows/pkgdown.yaml | 56 ++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 7417027..ed7650c 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,24 +1,48 @@ +# 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: push: - branches: master + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: -name: Pkgdown +name: pkgdown jobs: pkgdown: - runs-on: macOS-latest + 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 }} + permissions: + contents: write steps: - - uses: actions/checkout@master - - uses: r-lib/actions/setup-r@master - - uses: r-lib/actions/setup-pandoc@master - - name: Install dependencies - run: | - install.packages("remotes") - remotes::install_deps(dependencies = TRUE) - remotes::install_dev("pkgdown") - shell: Rscript {0} - - name: Install package - run: R CMD INSTALL . - - name: Deploy package - run: pkgdown::deploy_to_branch(new_process = FALSE) + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + 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/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs