Merge pull request #67 from igorkf/patch-1 #25
This file contains 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
on: | |
push: | |
branches: main | |
name: pkgdown | |
jobs: | |
pkgdown: | |
runs-on: ubuntu-22.04 | |
env: | |
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
id: install-r | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Query dependencies | |
run: | | |
install.packages('remotes') | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
shell: Rscript {0} | |
- name: Cache R packages | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: ubuntu-22.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} | |
restore-keys: ubuntu-22.04-${{ steps.install-r.outputs.installed-r-version }}-1- | |
- 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: Build and deploy pkgdown site | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' |