Merge pull request #153 from jr-leary7/dev #7
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
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
# Additional help taken from https://fromthebottomoftheheap.net/2020/04/30/rendering-your-readme-with-github-actions/ | |
on: | |
push: | |
branches: main | |
paths: [README.Rmd, render-README.yaml] | |
name: render-README | |
jobs: | |
render: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: install CRAN packages | |
run: Rscript -e 'install.packages(c("rmarkdown","ggplot2", "dplyr", "purrr", "remotes", "caret", "BiocManager"))' | |
- name: install BioConductor packages | |
run: Rscript -e 'BiocManager::install(c("SingleCellExperiment", "scater", "scran"))' | |
- name: install GitHub packages | |
run: Rscript -e 'remotes::install_github("jr-leary7/scLANE")' | |
- name: render README | |
run: Rscript -e 'rmarkdown::render("README.Rmd", output_format = "md_document")' | |
- name: commit rendered README | |
run: | | |
git config --local user.name "jr-leary7" | |
git config --local user.email "[email protected]" | |
git add README.md man/figures/README-* | |
git commit -m "Recompiled README.Rmd" || echo "No changes to commit" | |
git push origin || echo "No changes to commit" |