A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/r-lib/actions/commit/67f8747213d14413e1824d2429f4efa80342d1ad below:

install quarto if needed (#895) · r-lib/actions@67f8747 · GitHub

38 38

pandoc-version:

39 39

description: 'Pandoc version to install.'

40 40

default: '3.1.11'

41 +

install-quarto:

42 +

description: |

43 +

Whether to install quarto. If it is 'auto' (the default), it is

44 +

installed if there is at least one `.qmd` file in the repository,

45 +

inside `working-directory`. Set to 'true' to always install it.

46 +

Set to 'false' to never install it.

47 +

default: 'auto'

48 +

quarto-version:

49 +

description: |

50 +

Version of quarto to install, if quarto is installed. It is passed

51 +

to the `quarto-dev/quarto-actions/setup@v2` action. The default is

52 +

'release' to install the latest release. Other possible values are

53 +

a version number number (without the `v` prefix), and 'pre-release'.

54 +

default: 'release'

41 55

runs:

42 56

using: "composite"

43 57

steps:

@@ -156,20 +170,25 @@ runs:

156 170

- name: Check whether pandoc needs to be installed

157 171

id: check-pandoc

158 172

run: |

173 +

# Pandoc check

159 174

cat("::group::Check if package needs pandoc\n")

160 175

o <- '${{ inputs.install-pandoc }}'

161 176

if (! o %in% c('true', 'false')) {

162 177

if (Sys.which("pandoc") != "") {

178 +

cat("Pandoc is already installed at", Sys.which("pandoc"), "\n")

163 179

o <- 'false'

164 180

} else if (file.exists("DESCRIPTION")) {

165 181

deptypes <- list(direct = "all", indirect = character())

166 182

deps <- pak::pkg_deps(".", dependencies = deptypes)

167 183

if ("rmarkdown" %in% deps$package) {

184 +

cat("Pandoc is needed for rmarkdown\n")

168 185

o <- 'true'

169 186

} else {

187 +

cat("Pandoc is not needed\n")

170 188

o <- 'false'

171 189

}

172 190

} else {

191 +

cat("Pandoc is not needed, no R package found\n")

173 192

o <- 'false'

174 193

}

175 194

}

@@ -184,6 +203,38 @@ runs:

184 203

with:

185 204

pandoc-version: ${{ inputs.pandoc-version }}

186 205 206 +

- name: Check whether quarto if needed

207 +

id: check-quarto

208 +

run: |

209 +

# Quarto check

210 +

cat("::group::Check if package needs quarto\n")

211 +

o <- '${{ inputs.install-quarto }}'

212 +

if (! o %in% c('true', 'false')) {

213 +

if (Sys.which("quarto") != "") {

214 +

cat("Quarto is already installed at", Sys.which("quarto"), "\n")

215 +

o <- "false"

216 +

} else {

217 +

qmd <- dir(recursive = TRUE, pattern = "[.]qmd$")

218 +

if (length(qmd) > 0) {

219 +

cat("Quarto is needed for qmd file(s):", qmd[1], "...\n")

220 +

o <- "true"

221 +

} else {

222 +

cat("No qmd files found, Quarto is not needed.\n")

223 +

o <- "false"

224 +

}

225 +

}

226 +

}

227 +

cat("install=", o, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)

228 +

cat("::endgroup::\n")

229 +

shell: Rscript {0}

230 +

working-directory: ${{ inputs.working-directory }}

231 + 232 +

- name: Install quarto if needed

233 +

if: ${{ steps.check-quarto.outputs.install == 'true' }}

234 +

uses: quarto-dev/quarto-actions/setup@v2

235 +

with:

236 +

version: ${{ inputs.quarto-version }}

237 + 187 238

- name: Session info

188 239

run: |

189 240

# Session info


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4