Closed isaactpetersen closed 2 weeks ago
I think this is another instance of the bug caused by Chrome updating their headless configuration: https://github.com/quarto-dev/quarto-cli/issues/10626
By default, our actions install the latest stable version of Quarto, which currently has this issue.
We fixed this bug in the 1.6 prereleases, but the 1.5 patch release happens once a month, and so will (hopefully) be fixed on Sep 1 with 1.5.57. You can try to render with the prereleases by configuring the setup action like so:
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
Of course, this will mean you're now rendering with 1.6 instead of 1.5. But it should be enough for you to check that the issue is resolved.
Our repo is having a similar breakdown upon build. The issue also seemed to stem from the render workflow quarto-dev/quarto-actions/render@v2
. We got around it by manually rendering the PDF version using quarto render --profile pdf --output-dir _book
in the action, then committing the rendered PDF to gh-pages (I see your artifact archiver, that looks more streamlined). Perhaps a little hackish, but it got us back up and running. Here is a copy of our workflow, you can see the render is commented out and the manual render is right below.
Hope this helps.
on:
push:
branches: main
name: Render and Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
concurrency:
group: pages-deploy
cancel-in-progress: true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true
# uncomment below and fill to pin a version
# version: 0.9.600
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install system dependencies
run: sudo apt-get install -y libcurl4-openssl-dev
- name: Cache Renv packages
uses: actions/cache@v2
with:
path: ~/R/Library
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore R package dependencies with renv
run: |
Rscript -e "install.packages('renv')"
Rscript -e "renv::restore()"
- name: Install Barlow font
run: |
mkdir -p ~/.local/share/fonts
wget -qO- https://github.com/google/fonts/raw/main/ofl/barlow/Barlow-Regular.ttf > ~/.local/share/fonts/Barlow-Regular.ttf
wget -qO- https://github.com/google/fonts/raw/main/ofl/barlow/Barlow-Bold.ttf > ~/.local/share/fonts/Barlow-Bold.ttf
fc-cache -f -v
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
QUARTO_PROFILE: html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Render PDF
# uses: quarto-dev/quarto-actions/render@v2
# with:
# version: pre-release
# to: pdf
# path: .
# env:
# QUARTO_PROFILE: pdf
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Manually Render PDF (debug)
run: quarto render --profile pdf --output-dir _book
# Switch to branch gh-pages
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
# Copy the PDF to the gh-pages directory
- name: Copy PDF to gh-pages directory
run: |
cp ./_book/*.pdf gh-pages/
- name: Commit and Push PDF to gh-pages
working-directory: ./gh-pages
run: |
git config user.email "action@github.com"
git config user.name "GitHub Action"
git add -f *.pdf
git commit -m "Automatically generated PDF" -a || echo "No changes to commit"
git push origin gh-pages
We decided to go ahead and create a new stable 1.5 release ahead of schedule because of these reports. If you can confirm that your CI is using 1.5.57, then this issue should be fixed.
Here's a link to the working build with the manual PDF render: https://github.com/ianalexmac/aetr-web-book-2024/actions/runs/10620510306/job/29440437978
It appears to be using CI 1.5.57
Ok, thanks. I'm going to go ahead and close this issue, then.
Thank you!
Hmm, my GitHub Action is using the latest stable version of Quarto (1.5.57), and it is still running into the same issue. Any ideas?
@isaactpetersen You're correct, there's an additional issue in the setup stage. @cderv is investigating a fix (we have the same problem in quarto-web) and we'll let you know more when we do.
The only way we know how to partially work around this problem (which is unfortunately not a Quarto problem, as you can see by the place where your CI hangs) is to disable Chromium installation and usage entirely in CI. This is very unfortunate because you will not be able to render documents that (for example) have mermaid
or dot
diagrams to formats like typst
, pdf
and docx
.
You can try the change we made on quarto-web
for your own actions: https://github.com/quarto-dev/quarto-web/commit/f28e58e4f86a8f119c309df85fc4c2bce9463ba4
Thanks for the prompt responses. I appreciate it. Will this be fixed with the patch release on 9/1, or will I need to make the change you indicated for the forseeable future, in order to get my quarto website to render?
I have made a new v2.1.6 release with opting out the chrome checking that creates the problem. v2 and v2.1 tag are updated too.
Using quarto-dev/quarto-actions/render@v2
should solve this.
This means that
could happen again, but we'll find a new solution that don't create problem on CI.
I don't know if this is the right place to post this question, but I'm having an issue with rendering my Quarto website via GitHub Actions, and I'd appreciate help in either solving the issue or in finding the right place to post this question. My GitHub Action recently has been getting stuck on a particular step--the workflow had worked fine in prior runs, so I'm not sure what happened.
Here is my failing workflow: https://github.com/isaactpetersen/Fantasy-Football-Analytics-Textbook/actions/runs/10605075217/job/29393117856
The Action gets stuck on the job "Render Quarto Project":
My workflow file is below:
I'm not sure why I'm getting these warnings (and why the Action gets stuck), and my Action used to run fine. Any guidance would be greatly appreciated. Thanks in advance!