Quarto Render #109
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
name: Quarto Render | |
on: | |
workflow_dispatch: | |
pull_request: | |
schedule: | |
- cron: 00 12 1 * * | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
quarto-render: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ github.event_name == 'pull_request' }} | |
uses: r-lib/actions/pr-fetch@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: | |
any::knitr | |
any::rmarkdown | |
any::downlit | |
any::xml2 | |
any::webshot2 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: pre-release | |
- name: Render Quarto Project | |
uses: quarto-dev/quarto-actions/render@v2 | |
- name: Commit to Pull Request | |
shell: bash | |
run: | | |
git config --local user.name "${{ github.actor }}" | |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | |
git add _site/* | |
git add _freeze/* | |
git commit -m 'ci: quarto automatic render | |
skip-checks: true' || echo "No changes to commit" | |
- name: Create Pull Request | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: | | |
ci: quarto automatic render | |
skip-checks: true | |
signoff: false | |
branch: ci/latest-quarto-updates | |
delete-branch: true | |
title: "ci: quarto automatic render" | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
- name: Push to Pull Request | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: r-lib/actions/pr-push@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |