Render README #20
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
# Render readme, based on | |
# https://raw.githubusercontent.com/r-lib/actions/master/.github/workflows/render-readme.yaml | |
name: Render README | |
on: | |
workflow_dispatch: | |
jobs: | |
render: | |
name: Render README | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install rmarkdown, remotes, and the local package | |
run: | | |
install.packages("devtools") | |
devtools::install_local(".") | |
devtools::install_cran("rmarkdown") | |
shell: Rscript {0} | |
- name: Render README | |
run: Rscript -e 'rmarkdown::render("README.Rmd")' | |
- name: replace the data for bookdown | |
run: | | |
mv run_SSMSE-ex/results/SSMSE_scalar.csv inst/bookdown/data/SSMSE_scalar.csv | |
mv run_SSMSE-ex/results/SSMSE_ts.csv inst/bookdown/data/SSMSE_ts.csv | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
commit-message: 'docs: update readme' | |
add-paths: | | |
README.md | |
inst/bookdown/data/SSMSE_scalar.csv | |
inst/bookdown/data/SSMSE_ts.csv | |
man/figures/README*.png | |
branch: update-readme | |
title: 'Update readme' | |
body: | | |
Auto-generated by [render-readme.yml][1] | |
[1]: https://github.com/nmfs-fish-tools/SSMSE/tree/main/.github/workflows/render-readme.yml | |