Skip to content

Update edit_counts.csv #69

Update edit_counts.csv

Update edit_counts.csv #69

name: When stats change, knit stats.Rmd
## stat data files = _data/edit_counts.csv and _data/pathway_counts.csv
on:
workflow_dispatch:
push:
branches:
- main
paths:
- _data/*_counts.csv
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
update-stats:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libmagick++-dev
Rscript -e 'install.packages(c("knitr","scales","plyr","dplyr","magrittr","magick","remotes","stringr","ggplot2"))'
- name: Install BiocManager
run: |
remotes::install_cran("BiocManager")
shell: Rscript {0}
- name: BiocManager installations
run: |
BiocManager::install("RColorBrewer", ask = FALSE)
BiocManager::install("rWikiPathways", ask = FALSE)
shell: Rscript {0}
- name: Knit stats.Rmd
run: Rscript -e 'knitr::knit("_rmd/stats.Rmd", "stats.md")'
- name: Commit report
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add .
if git diff --exit-code --staged; then
echo "No changes"
else
git pull
git commit -m 'Update stats .md and files'
git push
fi