-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathaction.yml
More file actions
44 lines (44 loc) · 1.58 KB
/
action.yml
File metadata and controls
44 lines (44 loc) · 1.58 KB
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
name: 'Render Quarto project'
author: 'Carlos Scheidegger'
description: 'This action will render an existing quarto project'
inputs:
to:
description: 'Format to render output. Use "all" to generate all outputs, when eg rendering a book in HTML and PDF'
required: false
path:
description: 'Subdirectory containing the quarto project to be rendered'
required: false
default: "."
runs:
using: 'composite'
steps:
# Chrome v128 started to create problem. Pin previous version in the meantime
# - name: Install Chrome
# uses: browser-actions/setup-chrome@v1
# with:
# chrome-version: 127
# The Check Chromium step appears necessary to avoid a crash/hang when rendering PDFs
# https://github.com/quarto-dev/quarto-actions/issues/45#issuecomment-1562599451
#
# chromium is installed in the ubuntu 21 runners in GHA, so no need to install it
#- name: 'Check Chromium'
# if: ${{ runner.os == 'Linux' }}
# run: |
# echo $(which google-chrome)
# $(which google-chrome) --headless --no-sandbox --disable-gpu --renderer-process-limit=1 https://www.chromestatus.com
# shell: bash
- name: 'Render'
env:
QUARTO_PRINT_STACK: true
run: |
if [ "${{ inputs.to }}" == "" ]; then
quarto render ${{ inputs.path }}
else
quarto render ${{ inputs.path }} --to ${{ inputs.to }}
fi
if [ -f "_book" ]; then
echo "QUARTO_OUTPUT=_book" >> $GITHUB_ENV
elif [ -f "_site" ]; then
echo "QUARTO_OUTPUT=_site" >> $GITHUB_ENV
fi
shell: bash