From 542f21bd763ebbe5b857091a1928a1ebd824453d Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Tue, 2 Jul 2024 20:55:53 +0200 Subject: [PATCH] Use custom pandoc-devel action (#1471) as we wait for https://github.com/r-lib/actions/issues/868 to be fixed --- .github/workflows/R-CMD-check.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 293fedfc..0d4c965d 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -45,7 +45,7 @@ jobs: # testing R release with latest pandoc version and their dev version - {os: windows-latest, pandoc: 'latest', r: 'release'} - {os: macOS-latest, pandoc: 'latest', r: 'release'} - - {os: ubuntu-latest, pandoc: 'nightly', r: 'release'} + - {os: ubuntu-latest, pandoc: 'devel', r: 'release'} # testing older pandoc versions - {os: ubuntu-latest, pandoc: '3.1.11', r: 'release'} - {os: ubuntu-latest, pandoc: '2.19.2', r: 'release'} @@ -62,14 +62,12 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes + permissions: + actions: read + steps: - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 - with: - pandoc-version: ${{ matrix.config.pandoc }} - token: ${{ secrets.GITHUB_TOKEN }} - - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} @@ -97,6 +95,18 @@ jobs: extra-packages: any::rcmdcheck needs: check + - name: Remove default installed Pandoc + if: runner.os == 'Linux' + run: sudo dpkg -r pandoc + + - uses: r-lib/actions/setup-pandoc@v2 + if: matrix.config.pandoc != 'devel' + with: + pandoc-version: ${{ matrix.config.pandoc }} + + - uses: cderv/actions/setup-pandoc-nightly@nightly-pandoc + if: matrix.config.pandoc == 'devel' + - name: Pandoc and Tinytex info run: | rmarkdown::find_pandoc()