diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b7c94e8..2d09f30 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -21,16 +21,22 @@ jobs:
run: |
docker build -t demo-quarto-image .
+ - name: Create gallery directory on the host
+ run: |
+ echo 'Creating gallery directory...'
+ mkdir -p gallery && chmod -R 777 gallery
+ echo 'gallery directory created.'
+
- name: Run Quarto in Docker container
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace demo-quarto-image bash -c "
- echo 'Creating gallery directory...'
- mkdir -p gallery && chmod -R 777 gallery && \
- echo 'gallery directory created.'
-
+
source /opt/venv/bin/activate
echo 'activated virtualenv.'
+ ./r/install_quarto_extensions.expect
+ quarto list extensions
+
FOLDERS=(python r)
echo 'Folders to process: \${FOLDERS[@]}'
@@ -58,7 +64,6 @@ jobs:
done
done"
-
- name: Generate Index HTML
run: |
echo "
Gallery Index
" > gallery/index.html
@@ -69,10 +74,10 @@ jobs:
echo "
" >> gallery/index.html
- name: Upload HTML output
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: gallery
- path: gallery
+ path: gallery/
- name: Set up Git user
run: |
diff --git a/r/install_packages.R b/r/install_packages.R
index 29f9149..4716a5f 100644
--- a/r/install_packages.R
+++ b/r/install_packages.R
@@ -11,7 +11,8 @@ pkgnames <- c(
'devtools', 'DT', 'languageserver', 'styler', 'httpgd',
'shiny', 'shinyjs', 'shinyalert', 'shinyWidgets', 'shinythemes', 'shinycssloaders', 'shinyBS', 'shinylive',
'dplyr','ggplot2', 'plotly', 'tidyr', 'stringr', 'logr', 'tidyverse',
-'knitr', 'rmarkdown'
+'knitr', 'rmarkdown',
+"leaflet", "leaflet.extras"
)
print(paste0("Install Packages from Cran : ", pkgnames))
diff --git a/r/install_quarto_extensions.expect b/r/install_quarto_extensions.expect
new file mode 100644
index 0000000..89e317b
--- /dev/null
+++ b/r/install_quarto_extensions.expect
@@ -0,0 +1,22 @@
+#!/usr/bin/expect
+
+# Start the quarto command
+spawn quarto install extension quarto-ext/shinylive
+
+# Look for the prompt and send "y"
+expect "*Do you trust the authors of this extension*" {
+ send "Y\r"; exp_continue
+}
+
+# Expect the second prompt and send "y" again
+expect "*Would you like to continue*" {
+ send "Y\r"; exp_continue
+}
+
+# Expect the third prompt and send "y"
+expect "*View documentation using default browser?*" {
+ send "n\r";
+}
+
+# Wait for the process to finish
+expect eof