Code Monkey home page Code Monkey logo

quarto-actions's People

Contributors

aariq avatar cadojo avatar cderv avatar cscheid avatar eitsupi avatar gvelasq avatar hamelsmu avatar ihnorton avatar ijlyttle avatar jakobarendt avatar jennybc avatar jjallaire avatar joelostblom avatar lightbridge-ks avatar mcanouil avatar r-leyshon avatar robinlovelace avatar sparrow0hawk avatar srenatus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quarto-actions's Issues

listings order / fontsize ignored

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.

Line 22: syntax error near unexpected token `fi'

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!

Support netlify PR previews in publish action

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

  • Using git integration and quarto netlify plug-in
  • using git integration, rendering locally and auto deploy the committed output
  • using quarto render action and an existing Netlify deploy action.

Create release?

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.

TinyTex version error

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

Adding Quarto Shiny Deploy CI Example

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

Best practices to install R packages?

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?

Add support for subdirectories

E.g. via

- name: Publish to RStudio Connect (and render)
  uses: quarto-dev/quarto-actions/publish@v2
    with:
      to: connect
      render_subdir: <subdir>

Making actions work with new-ish GitHub pages

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.

image

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).

Check for Quarto before installing in `quarto-render`

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:

https://github.com/pommevilla/quarto-actions/blob/3cc4ff4d73e23cac69673125fcffef38957fe4b9/quarto-render/action.yaml#L9-L10

However, composite Github actions don't currently support conditionals.

When Github actions do support conditionals, we should add this functionality in.

documentation: render, then publish to GitHub pages (or somewhere else)

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!

Adapt quarto-actions/setup for use in GitHub Enterprise?

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:

# download the latest stable release
gh release download --repo quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}

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!

Expose installed quarto version "nicely"

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.

Introduce id keyword for quarto publish action

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

Can this action be used to publish a single .qmd document?

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.

How `freeze` should work when using Github Action ?

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.

Quarto Publish GH Action fails with `ERROR: No previous publishes available to re-publish (previous publish required with --no-prompt)`

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.

GH Pages error: No previous publishes available to re-publish

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!

ghpages-error

Cloudflare Publish Action

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!

Error linking shared objects/libraries when rendering blog post

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

follow-up workflow not triggered after quarto publish action

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!

documentation: putting things in perspective

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!


Composing Quarto Actions

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:

  • trigger: under what conditions does this workflow run?
  • defining the job:
    • runner: what platform to use?
    • setup: what does the runner need to install? Among other stuff, it will need to install quarto (using the setup action)
    • render: what should the runner do? If you have a quarto project, you'll use the quarto render action.
    • publish: once it has rendered, how (if?) to publish? There's a quarto action for that, too.

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

Failed to render and publish on Netlify with renv

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

Dependencies example does not show where to put the code

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.

set-output deprecated

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?

echo "::set-output name=installer::$(ls quarto*${{ env.BUNDLE_EXT }})"

Trouble setting Quarto CI up

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

https://github.com/JuliaManifolds/Manopt.jl/blob/98950441c56da211cbc26dfeb803e76546264ec9/.github/workflows/documenter.yml#L12-L21

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?

Render and publish creates issue in RSS feed XML file

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!

Quarto Publish action fails when format: pdf is defined in _quarto.yml

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.

https://github.com/quanteda/Text-Analysis-Using-R/blob/24b0a189d9a0075ea60ad48b00076ccfa8bc79dd/_quarto.yml#L75-L87

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!! 👏🙏👏

Render and Publish action fails with Error in loadNamespace(x) : there is no package called ‘jsonlite’ when code-fold: true

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.

publish.yml
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 }}
_quarto.yml
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
Render and Publish section of GitHub actions when failing:
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.

publish a shell script available from the curl command install the latest version of quarto on any task runner

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.

Updating extensions using GHA workflow

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

github action publish broke, invalid value for output-file

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!

{jsonlite} installation error during publish@v2

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 }}

Install Quarto on Windows using msi file directly

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 Scoopto install on Windows using https://github.com/cderv/r-bucket

Publish action failing due to _publish.yml

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.
image

Quarto action broken?

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 🙏🏽

Example of actions with dependencies using conda

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

Render action randomly fails when exporting to PDF: ERROR: Couldn't find open server

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.

image

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:

quarto-render-output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.