diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 9ee741a..c9f0165 100755 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,59 +1,50 @@ +# 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: - - main - - master + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: name: pkgdown +permissions: read-all + jobs: pkgdown: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: - RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - + permissions: + contents: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v1 - id: install-r + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-pandoc@v1 - - - name: Install pak and query dependencies - run: | - install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") - saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") - shell: Rscript {0} + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true - - name: Restore R package cache - uses: actions/cache@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: | - ${{ env.R_LIBS_USER }}/* - !${{ env.R_LIBS_USER }}/pak - key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} - restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1- - - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - pak::local_system_requirements(execute = TRUE) - pak::pkg_system_requirements("pkgdown", execute = TRUE) - shell: Rscript {0} + extra-packages: any::pkgdown, local::. + needs: website - - name: Install dependencies - run: | - pak::local_install_dev_deps(upgrade = TRUE, dependencies = c("all", "Config/Needs/website")) - pak::pkg_install("pkgdown") + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} - - name: Install package - run: R CMD INSTALL . - - - name: Build and deploy pkgdown site - run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index 47e20c6..3a1f143 100755 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ **.DS_Store inst/doc +docs diff --git a/_pkgdown.yml b/_pkgdown.yml index 485a7c4..fb137f8 100755 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,47 +1,4 @@ -destination: docs - -reference: -- title: Removing individual participant data from models - contents: - - strip_rawdata - - strip_rawdata.gam - - strip_rawdata.gamm - - strip_rawdata.list - - print.striprawdata - - summary.striprawdata - -- title: Meta-analysis - contents: - - metagam - - plot.metagam - - plot_dominance - - plot_heterogeneity - - plot_between_study_sd - - print.metagam - - print.summary.metagam - - summary.metagam - -- title: Pacakge overview - contents: - - metagam-package - - - -navbar: - type: default - left: - - text: Reference - href: reference/index.html - - text: Articles - menu: - - text: Introduction - href: articles/introduction.html - - text: Dominance analysis - href: articles/dominance.html - - text: Heterogeneity analysis - href: articles/heterogeneity.html - - text: Multivariate smooth terms - href: articles/multivariate.html - - text: Simultaneous confidence intervals and p-values - href: articles/pvals.html +url: https://lifebrain.github.io/metagam/ +template: + bootstrap: 5