From 5159d3f9661f2233a96840477d185b6ce75e6c03 Mon Sep 17 00:00:00 2001 From: lamonica-d <104020730+lamonica-d@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:05:08 +0100 Subject: [PATCH] Update pkgdown.yml bug fix attempt #2 --- .github/workflows/pkgdown.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml index 8194bff..a0eb308 100644 --- a/.github/workflows/pkgdown.yml +++ b/.github/workflows/pkgdown.yml @@ -5,16 +5,12 @@ on: branches: [main, master] pull_request: branches: [main, master] - release: - types: [published] - workflow_dispatch: name: pkgdown jobs: pkgdown: runs-on: ubuntu-latest - # Only restrict concurrency for non-PR jobs concurrency: group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: @@ -23,21 +19,20 @@ jobs: contents: write steps: - - uses: actions/checkout@master - - - uses: r-lib/actions/setup-r@v2 - + - uses: actions/checkout@v4 + - name: Install pandoc uses: r-lib/actions/setup-pandoc@v2 - - name: Install dependencies - run: | - options(pkgType = "binary") - options(install.packages.check.source = "no") - install.packages(c("remotes", "rcmdcheck", "covr", "pkgdown")) - remotes::install_deps(dependencies = TRUE) - shell: Rscript {0} + - 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: Install package run: R CMD INSTALL . @@ -45,10 +40,6 @@ jobs: # Build the package site locally run: Rscript -e 'pkgdown::build_site()' - - 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 @@ -56,3 +47,5 @@ jobs: clean: false branch: gh-pages folder: docs + +