Skip to content

Commit

Permalink
Update transform-notebooks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vsyrgkanis authored Jul 30, 2024
1 parent 7cf87f4 commit 99d4d6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/transform-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
- name: Strip outputs from .ipynb files
run: |
git pull
dirs=(PM1 PM2 PM3 PM4 PM5 CM1 CM2 CM3 AC1 AC2 T)
for dir in "${dirs[@]}"; do
# Check if directory exists
Expand Down Expand Up @@ -67,13 +68,14 @@ jobs:
# first we delete all Rmd files and regenerate. This will make sure
# that if a .irnb file is deleted then the corresponding .Rmd file
# will also be removed by this script.
rm "$dir"/*.Rmd
git rm "$dir"/*.Rmd
R -e "
files <- list.files(path = '$dir', pattern = '\\\\.irnb$', full.names = TRUE, recursive = FALSE)
lapply(files, function(input) {
rmarkdown::convert_ipynb(input)
})
"
git add "$dir"/*.Rmd
else
echo "Directory $dir does not exist."
fi
Expand Down

0 comments on commit 99d4d6f

Please sign in to comment.