From 6562d13a655d0914380952dcd681728604c807fb Mon Sep 17 00:00:00 2001 From: Wilson Freitas Date: Sat, 22 Jul 2023 13:04:25 -0300 Subject: [PATCH] Create render-README.yaml --- .github/workflows/render-README.yaml | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/render-README.yaml diff --git a/.github/workflows/render-README.yaml b/.github/workflows/render-README.yaml new file mode 100644 index 0000000..5ad9d57 --- /dev/null +++ b/.github/workflows/render-README.yaml @@ -0,0 +1,48 @@ +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + schedule: + # * is a special character in YAML so you have to quote this string + # Trigger once a week, on a Sunday (0) + - cron: "0 0 * * 0" + +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-pandoc@v2 + with: + pandoc-version: "3.1.3" + + - uses: quarto-dev/quarto-actions/setup@v2 + with: + version: pre-release + - run: | + quarto --version + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + pak-version: devel + extra-packages: | + quarto-dev/quarto-r + + - name: Render README + run: | + options(crayon.enabled = TRUE) + quarto::quarto_render("README.qmd", output_format = "html") + fs::file_copy("README.html", "index.html", overwrite = TRUE) + shell: Rscript {0} + + - uses: stefanzweifel/git-auto-commit-action@v4