generated from curso-r/template-pagina-do-curso
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (55 loc) · 1.73 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
48
49
50
51
52
53
54
55
56
57
58
59
60
on:
workflow_dispatch:
inputs:
turma:
description: 'turma: codigo da turma. ex: 202110-r4ds-1'
required: true
default: '202110-r4ds-1'
nome_curso:
description: 'nome_curso: Nome do curso'
required: true
default: 'R para Ciência de Dados 1'
download_material:
description: 'download_material: TRUE ou FALSE, se o curso tem zip para baixar'
required: true
default: 'TRUE'
name: render-readme
jobs:
render-readme:
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-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
packages:
any::knitr
any::rmarkdown
any::fs
any::tibble
any::dplyr
any::glue
any::readr
github::curso-r/CursoRopen
- name: Execute Script
env:
TURMA: ${{ github.event.inputs.turma }}
NOME_CURSO: ${{ github.event.inputs.nome_curso }}
DOWNLOAD_MATERIAL: ${{ github.event.inputs.download_material }}
run: |
Rscript "assets/render_readme.R"
- name: Commit results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add README.Rmd
git add README.md
git add _config.yml
git commit -m "Atualizando README" || echo "No changes to commit"
git push origin || echo "No changes to commit"