Skip to content

Commit

Permalink
updated session info page to extract packages from gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanThoma committed May 15, 2024
1 parent 50a5c9f commit 82aa41a
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion session_info.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,28 @@ title: "Session Info"
description: "This page displays the session information for the site."
---


```{r, include = FALSE, eval = TRUE, message = FALSE}
# Read the contents of the publish.yml file
publish_yml <- readLines(".github/workflows/publish.yml")
# Convert the YAML content to a list
publish_list <- yaml::yaml.load(publish_yml)
# Extract the package names from the list
package_names <- publish_list$jobs$`build-deploy`$steps[[4]]$with$packages
# Split the package names into a vector
package_names <- strsplit(package_names, "\n")[[1]]
# Load all the packages
for (package in package_names) {
library(package, character.only = TRUE)
}
```

```{r}
library(sessioninfo)
session_info()
```

0 comments on commit 82aa41a

Please sign in to comment.