-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (44 loc) · 2.06 KB
/
render-README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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: dev
paths: [README.Rmd, render-README.yaml]
name: render-README
jobs:
render:
runs-on: macos-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", "devtools", "BiocManager", "Seurat"), force = TRUE)'
- name: Extra dependencies
id: extra-deps
run: |
install.packages("Matrix", type = "source", force = TRUE)
install.packages("irlba", type = "source", force = TRUE)
install.packages("TMB", type = "source", force = TRUE)
install.packages("glmmTMB", type = "source", force = TRUE)
shell: Rscript {0}
- name: install BioConductor packages
run: Rscript -e 'BiocManager::install(c("SingleCellExperiment", "scater", "scran", "scuttle", "bluster"), force = TRUE)'
- 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 = "github_document", output_file = "README.md")'
- name: clean up README.md
run: Rscript -e 'lines <- readLines("README.md"); lines <- lines[!grepl("^====+$", lines)]; writeLines(lines, "README.md")'
- 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"