-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (43 loc) · 1.55 KB
/
render-readme.yml
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
# 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