Version bump and NEWS #47
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
name: render readme and pkgdown | |
# Controls when the action will run | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
render: | |
# The type of runner that the job will run on | |
runs-on: macOS-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'release' | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Query dependencies | |
run: | | |
install.packages(c('remotes', 'devtools')) | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
shell: Rscript {0} | |
- name: Cache R packages | |
uses: actions/cache@v1 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: macOS-r-release-${{ hashFiles('.github/depends.Rds') }} | |
restore-keys: macOS-r-release | |
- name: Install dependencies | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
install.packages("remotes") | |
remotes::install_deps(dependencies = TRUE) | |
remotes::install_cran("pkgdown") | |
devtools::document() | |
shell: Rscript {0} | |
- name: commit newly made helpfiles | |
run: | | |
git add man/* || echo "No changes to commit" | |
git commit -m "Re-build docs" || echo "No changes to commit" | |
git push origin master || echo "No changes to commit" | |
- name: Install package | |
run: R CMD INSTALL . | |
# install packages needed | |
- name: install required packages | |
run: Rscript -e 'install.packages(c("rmarkdown", "knitr", "badger", "pkgdown"))' | |
# Render README.md using rmarkdown | |
- name: render README | |
run: Rscript -e 'rmarkdown::render("README.Rmd", output_format = "md_document")' | |
- name: commit rendered README | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Render action" | |
git add README.md | |
git commit -m "Re-build README.md" || echo "No changes to commit" | |
git push origin master || echo "No changes to commit" | |
- name: Deploy package | |
run: pkgdown::deploy_to_branch(new_process = FALSE) | |
shell: Rscript {0} |