From 900b10cc860506fb43a4535c5125a21174c78f1d Mon Sep 17 00:00:00 2001 From: Nan Xiao Date: Tue, 20 Feb 2024 17:45:16 -0500 Subject: [PATCH 1/2] Sync GitHub Actions workflow with upstream latest version --- .github/workflows/quarto-publish.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/quarto-publish.yml b/.github/workflows/quarto-publish.yml index ffaefc4..d80ac38 100644 --- a/.github/workflows/quarto-publish.yml +++ b/.github/workflows/quarto-publish.yml @@ -1,15 +1,22 @@ on: push: - branches: [master, main] + branches: + - main name: Render and Publish +# Need these permissions to publish to GitHub Pages +permissions: + contents: write + pages: write + jobs: build-deploy: runs-on: ubuntu-latest + steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 @@ -19,7 +26,7 @@ jobs: # uncomment below and fill to pin a version # version: SPECIFIC-QUARTO-VERSION-HERE - # add software dependencies here + # Add software dependencies here - name: Install ttf-mscorefonts-installer run: | echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections @@ -36,7 +43,7 @@ jobs: - name: Set up R packages in DESCRIPTION uses: r-lib/actions/setup-r-dependencies@v2 - # To publish to Netlify, RStudio Connect, or GitHub Pages, uncomment + # To publish to Netlify, Posit Connect, or GitHub Pages, uncomment # the appropriate block below # - name: Publish to Netlify (and render) @@ -45,16 +52,17 @@ jobs: # target: netlify # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - # - name: Publish to RStudio Connect (and render) + # - name: Publish to Posit Connect (and render) # uses: quarto-dev/quarto-actions/publish@v2 # with: # target: connect # CONNECT_SERVER: enter-the-server-url-here # CONNECT_API_KEY: ${{ secrets.CONNECT_API_KEY }} + # NOTE: If Publishing to GitHub Pages, set the permissions correctly (see top of this yaml) - name: Publish to GitHub Pages (and render) uses: quarto-dev/quarto-actions/publish@v2 with: target: gh-pages env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This secret is always available for GitHub Actions From 619906e0bed35a07e6945f57fcaaf81fe59bda89 Mon Sep 17 00:00:00 2001 From: Nan Xiao Date: Tue, 20 Feb 2024 18:10:31 -0500 Subject: [PATCH 2/2] Fix undefined control sequence cellcolor error --- _quarto.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_quarto.yml b/_quarto.yml index e6abdbf..c9320ce 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -78,3 +78,7 @@ format: theme: [cosmo, custom.scss] pdf: documentclass: scrbook + # Fixes 'Undefined control sequence \cellcolor' error + include-in-header: + - text: | + \usepackage[table]{xcolor}