How can I deploy a quarto book using renv and github actions when the renv.lock file doesn't capture all the dependencies? #9150
-
DescriptionI am deploying a book using quarto, github actions and renv. I am locally using:
Also I have try locally using:
In the book I am using tikz as a language through knitr to create a diagram, where one of the packages needed is I create a minimal reproducible example in this repository: https://github.com/luifrancgom/question_magick_quarto The code that is failing when deploying is in the # Introduction
This is a book created from markdown and executable code.
See @knuth84 for additional discussion of literate programming.
# Diagram
```{r}
1 + 1
```
```{tikz}
#| out-width: 50%
\begin{tikzpicture}
\draw (-1,0) circle (1.5);
\end{tikzpicture}
``` The {
"R": {
"Version": "4.3.3",
"Repositories": [
{
"Name": "CRAN",
"URL": "https://cloud.r-project.org"
}
]
},
"Packages": {
"R6": {
"Package": "R6",
"Version": "2.5.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "470851b6d5d0ac559e9d01bb352b4021"
},
"base64enc": {
"Package": "base64enc",
"Version": "0.1-3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "543776ae6848fde2f48ff3816d0628bc"
},
"bslib": {
"Package": "bslib",
"Version": "0.6.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"base64enc",
"cachem",
"grDevices",
"htmltools",
"jquerylib",
"jsonlite",
"lifecycle",
"memoise",
"mime",
"rlang",
"sass"
],
"Hash": "c0d8599494bc7fb408cd206bbdd9cab0"
},
"cachem": {
"Package": "cachem",
"Version": "1.0.8",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"fastmap",
"rlang"
],
"Hash": "c35768291560ce302c0a6589f92e837d"
},
"cli": {
"Package": "cli",
"Version": "3.6.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "1216ac65ac55ec0058a6f75d7ca0fd52"
},
"digest": {
"Package": "digest",
"Version": "0.6.35",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "698ece7ba5a4fa4559e3d537e7ec3d31"
},
"ellipsis": {
"Package": "ellipsis",
"Version": "0.3.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"rlang"
],
"Hash": "bb0eec2fe32e88d9e2836c2f73ea2077"
},
"evaluate": {
"Package": "evaluate",
"Version": "0.23",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"methods"
],
"Hash": "daf4a1246be12c1fa8c7705a0935c1a0"
},
"fastmap": {
"Package": "fastmap",
"Version": "1.1.1",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "f7736a18de97dea803bde0a2daaafb27"
},
"fontawesome": {
"Package": "fontawesome",
"Version": "0.5.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"htmltools",
"rlang"
],
"Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d"
},
"fs": {
"Package": "fs",
"Version": "1.6.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"methods"
],
"Hash": "47b5f30c720c23999b913a1a635cf0bb"
},
"glue": {
"Package": "glue",
"Version": "1.7.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"methods"
],
"Hash": "e0b3a53876554bd45879e596cdb10a52"
},
"highr": {
"Package": "highr",
"Version": "0.10",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"xfun"
],
"Hash": "06230136b2d2b9ba5805e1963fa6e890"
},
"htmltools": {
"Package": "htmltools",
"Version": "0.5.7",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"base64enc",
"digest",
"ellipsis",
"fastmap",
"grDevices",
"rlang",
"utils"
],
"Hash": "2d7b3857980e0e0d0a1fd6f11928ab0f"
},
"jquerylib": {
"Package": "jquerylib",
"Version": "0.1.4",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"htmltools"
],
"Hash": "5aab57a3bd297eee1c1d862735972182"
},
"jsonlite": {
"Package": "jsonlite",
"Version": "1.8.8",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"methods"
],
"Hash": "e1b9c55281c5adc4dd113652d9e26768"
},
"knitr": {
"Package": "knitr",
"Version": "1.45",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"evaluate",
"highr",
"methods",
"tools",
"xfun",
"yaml"
],
"Hash": "1ec462871063897135c1bcbe0fc8f07d"
},
"lifecycle": {
"Package": "lifecycle",
"Version": "1.0.4",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cli",
"glue",
"rlang"
],
"Hash": "b8552d117e1b808b09a832f589b79035"
},
"memoise": {
"Package": "memoise",
"Version": "2.0.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"cachem",
"rlang"
],
"Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c"
},
"mime": {
"Package": "mime",
"Version": "0.12",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"tools"
],
"Hash": "18e9c28c1d3ca1560ce30658b22ce104"
},
"rappdirs": {
"Package": "rappdirs",
"Version": "0.3.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "5e3c5dc0b071b21fa128676560dbe94d"
},
"renv": {
"Package": "renv",
"Version": "1.0.5",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"utils"
],
"Hash": "32c3f93e8360f667ca5863272ec8ba6a"
},
"rlang": {
"Package": "rlang",
"Version": "1.1.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "42548638fae05fd9a9b5f3f437fbbbe2"
},
"rmarkdown": {
"Package": "rmarkdown",
"Version": "2.26",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"bslib",
"evaluate",
"fontawesome",
"htmltools",
"jquerylib",
"jsonlite",
"knitr",
"methods",
"tinytex",
"tools",
"utils",
"xfun",
"yaml"
],
"Hash": "9b148e7f95d33aac01f31282d49e4f44"
},
"sass": {
"Package": "sass",
"Version": "0.4.9",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R6",
"fs",
"htmltools",
"rappdirs",
"rlang"
],
"Hash": "d53dbfddf695303ea4ad66f86e99b95d"
},
"tinytex": {
"Package": "tinytex",
"Version": "0.50",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"xfun"
],
"Hash": "be7a76845222ad20adb761f462eed3ea"
},
"xfun": {
"Package": "xfun",
"Version": "0.42",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"grDevices",
"stats",
"tools"
],
"Hash": "fd1349170df31f7a10bd98b0189e85af"
},
"yaml": {
"Package": "yaml",
"Version": "2.3.8",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "29240487a071f535f5e5d5a323b7afbd"
}
}
} In this case what will the best approach to solve the problem? i. Change the way I am using tikz? Also I don't know how to proceed even if I will be able to include 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@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- 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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Unfortunately, this is out of Quarto scope. See system requirements: https://github.com/ropensci/magick/blob/8d22d7badda48a936db739d468c244fbc286132f/DESCRIPTION#L20 You need to add this in your workflow. |
Beta Was this translation helpful? Give feedback.
-
Thank you Mickaël Canouil. You were right, this is out of the Quarto scope. If anyone needs to solve the same or a similar problem I find a possible solution in the following way:
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@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- name: Install R
uses: r-lib/actions/setup-r@v2
- name: Install Magick++
run: sudo apt-get install -y libmagick++-dev
- name: Install Poppler C++ API
run: sudo apt-get -y install libpoppler-cpp-dev
- 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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Beta Was this translation helpful? Give feedback.
Unfortunately, this is out of Quarto scope.
See system requirements: https://github.com/ropensci/magick/blob/8d22d7badda48a936db739d468c244fbc286132f/DESCRIPTION#L20
You need to add this in your workflow.