quarto-dev / quarto-actions Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
I have a setup with 2 id's for publishing
I want to setup my CI in such a way that I can deploy preview site on every commit but main site only on explicit workflow dispatch call. It would be nice to have id as input option to composite action so that I can quickly adapt the same for different scenarios
I'm using these actions to publish a Quarto book. I am constantly getting an error message via email after the actions fire, with details as below.
Seems to want _publish.yml somewhere instead of publish.yml? Also my email settings for Git are already correctly set so I'm unsure where that line is coming from, and whether I need to adjust it.
I followed all of the instructions for setting up the GitHub Action for publishing (with frozen computations) from https://quarto.org/docs/publishing/github-pages.html#github-action. This failed however with the same error reported in #29 (see this failed run for instance). I solved it by removing the pdf format from my _quarto.yml
per the suggestion by @clente on that issue.
But then in RStudio, the menu option to build the pdf version disappears, which is a shame. It would be nice to retain this option but be able to define the quarto render/publish actions in https://github.com/quarto-dev/quarto-actions/blob/main/publish/action.yml to render HTML only.
Thanks for such an amazing piece of software!! 👏🙏👏
In addition to using the latest Quarto, I would also like to use the latest versions of Quarto extensions. But I can't seem to figure out how to specify this in GHA workflow, and it would be great if you could include an example for this in the current repo.
Here is what I am currently using, but the job to install extensions gets stuck.
# The two "Yes" are to answer the following questions:
# > Do you trust the authors of this extension(Y/n)?
# > Would you like to continue (Y/n)?
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
- run: |
echo "Yes" | echo "Yes" | quarto install extension quarto-ext/fontawesome
Thanks for putting these actions together.
I'm wondering if it would be possible to create a GitHub Action to publish to Cloudflare? Currently I'm using the GA to publish to GitHub Pages, and then using CloudFlare Pages to deploy from the gh-pages
branch. This works, but effectively duplicates the output (CloudFlare and GitHub Pages). Just using the render action didn't seem to trigger any changes to the gh-pages
branch, therefore does not result in any downstream changes to the published document as there's nothing for CloudFlare to update.
If I'm missing an obvious solution, please let me know!
Hi, I've an Idea.
I've create GHA workflow that deploy Shiny app using Quarto using {rsconnect}
to shinyapps.io seamlessly, as inspired from this shiny-deploy action
Here are the example app:
jobs:
shiny-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 Environment
uses: r-lib/actions/setup-renv@v2 # Installs packages from renv lockfile
with:
cache-version: 1
- name: Install {rsconnect} and {quarto}
run: |
renv::install("rsconnect")
renv::install("quarto")
shell: Rscript {0}
- name: Authorize and deploy app
env:
APPNAME: your-app-name
ACCOUNT: your-account-name
SERVER: shinyapps.io
run: |
rsconnect::setAccountInfo("${{ secrets.RSCONNECT_USER }}", "${{ secrets.RSCONNECT_TOKEN }}", "${{ secrets.RSCONNECT_SECRET }}")
rsconnect::deployApp(appName = "${{ env.APPNAME }}", account = "${{ env.ACCOUNT }}", server = "${{ env.SERVER }}", quarto = quarto::quarto_path())
shell: Rscript {0}
However, the action must at least install R, {rsconnect}
, {quarto}
, and have shinyapps.io
account.
Do you think is it a good idea to may be include here in the examples/
section of this repo and write some tutorial ?
If so, I might able to help you with that.
Thankyou
I'm trying to use the Quarto GitHub Action to render and publish a book in both the PDF and HTML format, but unfortunately it is producing the following error when trying to render the PDF output.
ERROR: Your TexLive version is not updated enough to connect to the remote repository and download packages. Please update your installation of TexLive or TinyTex.
Underlying message: Local TeX Live (2022) is older than remote repository (2023).
I have tried a number of different things to update the CTAN repository manually, using a different pdf-engine, etc, but unfortunately none of them seem to work.
Any thoughts would be appreciated.
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
env:
GH_TOKEN: ${{ secrets.QUARTO_PUBLISH_TOKEN }}
- name: Publish HTML book
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
render: true
E.g. via
- name: Publish to RStudio Connect (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
to: connect
render_subdir: <subdir>
The dependencies example says to add
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0' # The R version to download (if necessary) and use.
But it does not indicate where that code is supposed to go as far as indentation and parent. Does it go under jobs: built-deply: steps:? Or top level? More info is needed.
A lot of times, I will want to render for pull-requests (make sure it still renders) but deploy only on changes to main (having merged a PR).
Would you consider a PR for documentation?
Something like:
- name: Render Quarto
uses: quarto-dev/quarto-actions/render@v2
- name: Publish to GitHub Pages
if: github.event_name != 'pull_request'
uses: quarto-dev/quarto-actions/publish@v2
with:
render: false
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
Thanks!
A feature request: It would be great to have a sample action here for installing a specific version of Quarto, in addition to the existing action that installs the latest.
I was having quite a bit of trouble using quarto-publish-example as a basis and following instructions from here when "Source: GitHub Pages [Beta]" is selected on my Pages settings.
Ultimately I was able to get things working with the following, using static.yml as a basis.
# Simple workflow for deploying static content to GitHub Pages
name: Publish Quarto page to GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
publish-site:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
container:
image: ghcr.io/dukestatsci/r_gh_actions:latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build site
run: |
quarto render
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: '_site/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
I thought it might be helpful to leave this here but also to address the various GitHub pages options in the instructions at https://github.com/quarto-dev/quarto-actions/tree/main/publish#github-pages? I am still not 100% clear on the organization of this repo so I don't have a concrete PR to make but I'm happy to try if this is actually something missing (as opposed to something I missed even though it's addressed).
When I try to run publish@v2
, I get the following error:
Error in loadNamespace(x) : there is no package called ‘jsonlite’
https://github.com/PittMethods/r4ss/runs/7403069481?check_suite_focus=true
My publish.yml was copied directly from: https://quarto.org/docs/publishing/github-pages.html
on:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Hi,
I had trouble using miniconda (setup-miniconda@v2 + environment.yml) in conjunction with the quarto publishing action to add Python modules and dependencies. On the other hand, all this worked with setup-python@v4 and the use of pip and a requirements.txt file.
See workflow here (use of conda commented) https://github.com/computorg/published-paper-tsne/actions/runs/3257812600/workflow
Did I misconfigure something? Maybe I didn't activate the right environment? Adding an entry with (mini)conda among the usage examples with dependencies would be very helpful.
Thanks
It may be useful to publish a shell script available from the curl command on a website so that we can immediately install the latest version of quarto on any task runner.
Originally posted by @eitsupi in quarto-dev/quarto-cli#439 (reply in thread)
There are cases where install-quarto
action can't be used (like in docker containers runners).
We should be able to at least make our installation steps available in a script that could be used outside of the action.
With a private GitHub repository and public GitHub Pages, you can publish at the command line using:
quarto publish gh-pages --no-browser
cf. https://quarto.org/docs/publishing/github-pages.html#private-sites.
Is it possible get that --no-browser
argument with quarto-dev/quarto-actions/publish@v2
?
I have a github action rendering and publishing a quarto book to github pages. It was working for a commit two months ago and now is not. It looks like the book is still rendering, but not publishing. This is the error:
In file /home/runner/work/pfmc_assessment_handbook/pfmc_assessment_handbook/index.qmd Invalid value for output-file: paths are not allowed
It goes on to list a number of invalid file paths for output-file. I am not sure how to create a minimally reproducible example, but the error is here.
Thank you!
Our setup should install (and cache when appropriate) all tools by default.
It appears that this action only works with projects that are type: website or type: book. Is there a way to use this action to just publish a single document? Do I need to have something like the following in _quarto.yml?
project:
title: "proj-title"
execute-dir: project
render:
- docs/my_document.Qmd
type: website
This allows me to use the action, I think, but messes up my targets pipeline because tarchetypes::tar_quarto()
expects the rendered .html to be in the same directory as the .Qmd file. Changing the output-dir
to "docs" just causes the .qmd file to be deleted on rendering.
I saw a warning in my CI today:
Annotations
1 warning
build-deploy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Could it be from the following?
quarto-actions/setup/action.yml
Line 52 in d1d44ff
Hi,
I just stumbled over a problem when rendering a quarto website for github pages (kkmann/workshop-r-swe#15 and kkmann/workshop-r-swe#16).
Fontsize options (both in the yaml header and via scss files) are ignored and the ordering of the listings are off (specified as by name) in the gh-pages version. Locally everything works fine. I tried to enforce the same Quarto version as I am using locally but it didn't solve the issue.
I couldn't diagnose the problem and will try switching to the containerized approach proposed by @cicdguy for now.
following updates on quarto-dev/quarto-cli#326 (comment)
I think the installation should correctly be put into the PATH and no manual addition should be needed
Hi @pommevilla !
We have now create this repo to store action about Quarto. I have added a simple action to install quarto.
Would you be ok to move your work for quarto-render
into this repo ?
I am thinking of https://github.com/pommevilla/quarto-render
We could also work on some examples for Quarto project together. What do you think ?
This would avoid having to call quarto tools install tinytex
and would deal with the PATH issue
My GitHub Actions are apparently properly configured, and I can see the green check mark after every commit to master. However, the logs show that the site is being deployed to the wrong URL and the commits to the gh-pages
branch continuously alternate the URL from
juliohm.github.io/mysite
(correct)
to
github.com/juliohm/mysite
(incorrect)
Perhaps this is due to some discrepancy in the version of my local quarto publish gh-pages
command and the action here?
Can you please help debug this issue further? I am looking forward to seeing my Quarto website published 🙏🏽
As mentioned in #1, it might be the case that the user will render multiple times in a single workflow. Currently, quarto-render
always calls install-quarto
before rendering. Instead, quarto-render
should check for Quarto before installing.
Ideally, this could be done with an if:
step in the action.yaml
:
However, composite Github actions don't currently support conditionals.
When Github actions do support conditionals, we should add this functionality in.
Our publish
should support deploying to preview website for PR previews. This is possible using netlify API with a specific action, so we should be able to make that possible.
Other solutions currently requires
Even though (I think) I am reasonably "with it" :), it took me a while to build this mental model for quarto actions - I thought it could be useful for others.
My first exposure to actions is the {usethis} model, where you are provided a complete action that you can modify.
It took me a while to see the "building-block" model, where we compose our own actions. Given the flexibility of Quarto (R, Python, etc.), and the weird ways in which we will all use it, this makes sense.
I'd be happy to contribute a PR for the README that could have something like what's below.
I know it's a little wordy, and may be specific to my usage 🤓, but at least it can start a conversation.
Thanks!
The actions described here (setup, render, publish) are meant to be used as building blocks in larger actions that you should feel confident to compose; we provide some examples.
The thing you'll make, an Action workflow, lives in a specific directory of your repository: .github/workflows
, and is a YAML file (extension .yaml
).
It has these main parts:
The trigger section is at the start of an action. If you wanted to run the action on every push to main
(or master
) or on every pull-request to main
, you could do this:
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
You'll see this pattern a lot in the examples. If you like, you can run the action on a schedule.
Defining the job and the runner:
name: Render and Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
This is the scaffolding for the rest of the steps. You'll likely want to run on unbuntu-latest
because it is the least expensive (you'll hit the free limit later).
The first step is the setup. If using quarto, you'll always have something like this:
- uses: actions/checkout@v2
- uses: quarto-dev/quarto-actions/setup@v2
Now, you need to install "stuff", depending on what Quarto uses to render, e.g. R, Python, ...
From time to time, you might find that you have to specify a Linux library to be installed:
- name: Install additional libraries on Linux
if: runner.os == 'Linux'
run: |
# adapt to your situation
sudo apt-get update -y
sudo apt-get install -y libcurl4-openssl-dev
sudo apt-get install -y libharfbuzz-dev
sudo apt-get install -y libfribidi-dev
You'll know you need to do this if your action fails and the error says that you are missing a system library.
If you need a particular version of Python:
- uses: actions/setup-python@v4
with:
python-version: 3.9.13
cache: pip # caching pip dependencies
If you are using a Python virtual environment (not with renv):
- run: pip install -r requirements.txt
If you are using R, you'll need to add the step to install
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
If you are using renv (which is likely if you are using R), you'll need this:
- uses: r-lib/actions/setup-renv@v2
If you are using Python within renv, the setup-renv
action will install your virtual environment - you don't need to do it explicitly.
Next, you may wish to render as a separate step so that you don't deploy on pull-resuests:
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
Finally, if you want to publish, for example, to GitHub pages:
- name: Publish to GitHub Pages
if: github.event_name != 'pull_request'
uses: quarto-dev/quarto-actions/publish@v2
with:
render: false
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
I've been trying to setup the GitHub action quarto-dev/quarto-actions/publish@v2
on my repo for Quarto slides.
Whenever I push it fails with [example] :
ERROR: No previous publishes available to re-publish (previous publish required with --no-prompt)
I initially thought this was because i'd committed the GitHub action before running quarto publish gh-pages
locally but after deleting the GitHub repository, pushing the code back, cancelling the GH action run and running quarto publish gh-pages
I still get this error.
Running quarto publish gh-pages --no-prompt
locally does not solve this issue.
We should support installing any tools available in quarto tools
through setup-quarto
I'm starting to experiment with quarto (and r-lib) actions in GitHub Enterprise (GHE). Things are mostly working, with a few snags here-and-there.
I have encountered a snag in the setup action:
quarto-actions/setup/action.yml
Lines 42 to 43 in f8db812
As I understand, gh
assumes you are working with GitHub and that you have a valid GitHub token.
I can get around the first problem by adding the host:
gh release download --repo github.com/quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}
But the second problem remains: on GHE, GITHUB_TOKEN
works on GHE - not GitHub proper.
I can work around this problem by specifying a version in my action workflow, e.g.:
- name: Set up Quarto
uses: <local-fork>/quarto-actions/setup@v2
with:
version: 1.0.38
Could there be a way to make the "stable release" method robust to use on GitHub Enterprise?
To be clear, this is not an urgent issue. The wheels of progress can turn slowly at big companies; we are a long way from rolling anything out internally.
Thanks!
Hi, thanks for the neat repo! 💯 🚀
I have a very basic site created with Quarto (private repo) that I'm trying to set GH Actions for automatic deployment on GH Pages. The repo doesn't yet have a gh-pages branch, and I followed the exact step here but am encountering this peculiar error:
ERROR: No previous publishes available to re-publish (previous publish required with --no-prompt)
Any idea why this is? Thanks a bunch!
I'm using quarto-actions in CI, but I'm not sure how to best prepare my R installation.
Here's what I have:
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
This yields this error:
Run quarto-dev/quarto-actions/render@v2
Run if [ "" == "" ]; then
Error in loadNamespace(x) : there is no package called ‘jsonlite’
Calls: .main ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
R installation:
Version: 4.2.1
Path: /usr/lib/R
LibPaths:
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
rmarkdown: (None)
The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown")
Error: Process completed with exit code 1.
How would go after this? Use renv?
What I tried so far:
# gh auth must be setup
gh release download --repo quarto-dev/quarto-cli --pattern '*.msi' v0.2.144
# will install interactively with user interaction
msiexec /i "quarto-0.2.144-win.msi"
# will suppress the interaction but some windows open
msiexec /i "quarto-0.2.144-win.msi" /passive
# using quiet mode does not seem to work
msiexec /i "quarto-0.2.144-win.msi" /quiet
# using special /qn flag either
msiexec /i "quarto-0.2.144-win.msi" /qn
This will be possible one we sort out
Currently we us Scoop
to install on Windows using https://github.com/cderv/r-bucket
Using freeze
will create a folder _freeze
that should be kept. Usually it is committed (https://github.com/quarto-dev/quarto-web/tree/main/_freeze) as without it, freezing would not work.
When rendering a Quarto project on Github action, how should that behave ? For document not using freeze
it would be ok. For others, it would be required to commit back the change in _freeze
probably.
It seems we may have some workflow where rendering locally the website and committing the _site
folder will be easier than having GHA render the project.
First off, thank you for creating such an excellent publishing system. Never built my own website before, but with Quarto and gh-pages, I managed to do so in a couple of days.
I've been using the publish action to automatically update my website, but I'm having an issue with the XML file that is produced for the RSS feed. When rendering the site with Quarto itself, the XML content points to the correct URL for my site and articles/posts, e.g. "[username].github.io/...".
However, the file that's produced by the publish action changes this web address to "github.com/[username]/[repository]/...", which results in a 404 error when links are clicked through in an RSS reader.
I am working around this issue for now by manually copying across the correct version of the XML file to my gh-pages branch, but I thought I'd flag it as an issue (a) in the hope you have some advice on how to resolve the issue, and (b) in case others are experiencing similar.
Thanks!
I am trying to render my Julia Tutorials written in Quarto in CI to not commit the Markdown files longer.
But besides not knowing whether quarto brings Python/Jupyter with itself or I have to install that as well on CI (net yet sure how), it for now does not find the folder.
The repository is this
https://github.com/JuliaManifolds/Manopt.jl/tree/kellertuer/quarto-ci
the tutorials are in the tutorials/
folder (also the quarto config), but neither with not without trailing /
that folder seems to be found with
see
https://github.com/JuliaManifolds/Manopt.jl/actions/runs/5098182999/jobs/9165174924#step:4:1
So I am not sure how I would correctly specify that I wan to render all files in that folder?
I am using r-lib/actions/setup-renv@v2
to deploy a Quarto blog with renv
enabled.
After examination of the rendering logs, I noticed that there were errors concerning shared objects.
[ 7/16] posts/2022-08-11-how-to-read-amsr2-seaice-data/index.qmd
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/runner/work/_temp/renv/cache/v5/R-4.2/x86_64-pc-linux-gnu/terra/1.6-7/5d0f75086235149ccfa42c3f3596a079/terra/libs/terra.so':
libproj.so.15: cannot open shared object file: No such file or directory
Calls: .main ... getNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
This is likely because my system libraries are different from those on ubuntu-latest
. Any advice on how I can tackle this problem?
Thank you,
Phil
Hi there.
I am folowing these instructions to integrate renv
with github actions with Netlify:
https://quarto.org/docs/publishing/netlify.html#example-knitr-with-renv
However, I am getting a render/deploy error:
https://github.com/PMassicotte/r-blog/runs/7593624752?check_suite_focus=true#step:23:43
Run quarto-dev/quarto-actions/publish@v2
Run git config --global user.email "[email protected]"
ERROR: No previous publishes available to re-publish (previous publish required with --no-prompt)
Error: Process completed with exit code 1.
Anything I missed?
Thank you,
Phil
It is recommended that v2 releases be created because dependabot, which is widely used for automatic GHA updates, has the ability to automatically include release notes in PullRequests.
Publishing a Quarto website via GitHub using a publish.yml file in directory .github\flows returns the error Error in loadNamespace(x) : there is no package called ‘jsonlite’
and then fails. The jsonlite package is seemingly needed for the html option code-fold: true
(error does not occur without code-fold: true
).
Rendering on my local device works fine, only publishing via GitHub and using the publish.yml file fails. A current work-around I am using is rendering locally and using render: "false"
under with
in the Render and Publish
section of the publish.yml file.
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0'
- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
render: "false"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
project:
type: website
website:
sidebar:
style: "floating"
search: true
contents:
- section: "Home"
contents:
- index.qmd
- section: "Getting started"
contents:
- r.qmd
- rstudio.qmd
format:
html:
code-fold: true
code-line-numbers: true
code-summary: "Answer"
theme: solar
toc: false
fig-cap-location: margin
editor: source
engine: knitr
execute:
freeze: auto
Run quarto-dev/quarto-actions/publish@v2
Run git config --global user.email "[email protected]"
From https://github.com/rjjanse/rt
* branch gh-pages -> FETCH_HEAD
* [new branch] gh-pages -> origin/gh-pages
Rendering for publish:
[1/3] r.qmd
[2/3] rstudio.qmd
[3/3] index.qmd
Error in loadNamespace(x) : there is no package called ‘jsonlite’
Calls: .main ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
R installation:
Version: 4.2.0
Path: /opt/R/4.2.0/lib/R
LibPaths:
- /home/runner/work/rt/rt/renv/library/R-4.2/x86_64-pc-linux-gnu
- /home/runner/.cache/R/renv/sandbox/R-4.2/x86_64-pc-linux-gnu/b06d72e6
rmarkdown: (None)
The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown")
Error: Process completed with exit code 1.
Hello!
I'm using setup@v2 and push@v2 actions in my repository https://github.com/estadisticaunr/estadistica-bayesiana. It used to work well, but recently I got a couple of failures with the following message
if [ Linux != "Windows" ]; then
# On Windows scoop will be used so no need to download the release
if [ -z "" ]; then
# download the latest stable release
gh release download --repo quarto-dev/quarto-cli --pattern *linux-amd64.deb
version=$(curl https://quarto.org/docs/download/_download.json | jq -r '.version')
echo "version=${version}" >> $GITHUB_OUTPUT
elif [ "" == "LATEST" -o "" == "pre-release" ]; then
# get latest pre release version
version=$(curl https://quarto.org/docs/download/_prerelease.json | jq -r '.version')
wget https://github.com/quarto-dev/quarto-cli/releases/download/v$version/quarto-$version-linux-amd64.deb
echo "version=${version}" >> $GITHUB_OUTPUT
else
# download a specific release
wget https://github.com/quarto-dev/quarto-cli/releases/download/v/quarto--linux-amd64.deb
echo "version=" >> $GITHUB_OUTPUT
fi
echo "installer=$(ls quarto*linux-amd64.deb)" >> $GITHUB_OUTPUT
else
# FIXME: how to get version information from scoop in windows runners?
# send the cderv bat-signal!
fi
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
R_LIBS_USER: /home/runner/work/_temp/Library
TZ: UTC
_R_CHECK_SYSTEM_CLOCK_: FALSE
NOT_CRAN: true
R_LIB_FOR_PAK: /opt/R/4.2.2/lib/R/site-library
BUNDLE_EXT: linux-amd64.deb
GITHUB_TOKEN: ***
/home/runner/work/_temp/a93c4f63-ea4e-4723-b14e-90932[37](https://github.com/estadisticaunr/estadistica-bayesiana/actions/runs/3830766211/jobs/6519056612#step:5:39)bc6c5.sh: line 22: syntax error near unexpected token `fi'
Error: Process completed with exit code 2.
This is the YAML file
on:
push:
branches: main
name: Renderizar y publicar página web
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
packages: |
any::here
any::rmarkdown
any::knitr
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Is this a problem with the action? I'm not sure, since I don't see it has changed. But anyway, I think this is a good place to consult.
Thanks al lot!
Recently each time I run quarto-dev/quarto-actions/publish@v2 my custom domain for my gh-pages deployment gets clobbered. Looking in the gha log I spot the following:
delete mode 100644 CNAME
Not sure if there's already a mechanism to tell the action to not delete that file, but it might be a good idea to include an option like https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-add-cname-file-cname
It's currently possible to backout what quarto version has gotten installed, but it would be great if the setup action included a call to quarto --version
or similar so that this is stated cleanly in the log.
Occasionally, quarto-actions/render@v2
fails to run, causing ERROR: Couldn't find open server
. I've only experienced this problem when rendering to PDF, HTML output seems fine.
Has anyone experienced it?
Tested on:
Ubuntu 20.04 and 22.04
Quarto: latest version (1.1.189) and fixing one (1.0.37)
Workflow example:
name: Generate PDF
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
jobs:
generate-pdf:
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- name: Quarto check
run: |
quarto check --log-level info
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: pdf
path: input/P123-qmd-file.qmd
This is the output of all Quarto actions of the workflow when fails:
Hi,
I have a public repo: https://github.com/kanglcn/insar101 to write and host a website with the quarto tool. The main
branch is the source code, and the gh-pages
is the generated website content.
I have two workflow files. The deploy.yml is used to render the content and update the gh-pages
:
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install Python and Dependencies
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
The sftp.yml is used to copy the gh-pages
branch to another server via SFTP:
on:
workflow_dispatch:
page_build:
jobs:
deploy_job:
runs-on: ubuntu-latest
name: sftp to SMU
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'gh-pages'
- name: deploy file
uses: wlixcc/[email protected]
with:
username: ${{ secrets.SMU_HOST_USER}}
server: ${{ secrets.SMU_HOSTNAME }}
sftp_only: true
password: ${{ secrets.SMU_HOST_PASSWORD }}
local_path: './*'
remote_path: '/users/pubhtml/other/kangl/public_html/insar101'
sftpArgs: '-o ConnectTimeout=5'
I found the first workflow can be corrected triggered by push, then the github pages was built successfully. However, the second workflow was not triggered. The interesting thing is, if I change the repo from public to private, the second workflow will be triggered.
I have asked a question at https://github.com/orgs/community/discussions/40392#discussioncomment-4283136 and people there suspect this is because workflow using GITHUB_TOKEN
will not trigger new workflow anymore. I have tried to replace GITHUB_TOKEN
to a personal access token but the SFTP workflow was still not triggered.
Does anybody know the solution?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.