Skip to content

Commit

Permalink
ci: render action
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanouil committed Dec 9, 2023
1 parent 768c180 commit 42fd5aa
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
71 changes: 71 additions & 0 deletions .github/workflows/quarto-render.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release

- if: ${{ github.event_name == 'schedule' }}
run: |
rm -rf extensions/yaml
- 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 docs/*
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 }}
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project:
type: website
output-dir: _site
output-dir: docs
pre-render:
- extensions/make-yaml.sh

Expand Down

0 comments on commit 42fd5aa

Please sign in to comment.