Skip to content

Commit

Permalink
add misiing libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
MeWu-IDM committed Sep 26, 2024
1 parent 0f5c234 commit fa2564f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}'
Expand Down Expand Up @@ -58,7 +64,6 @@ jobs:
done
done"
- name: Generate Index HTML
run: |
echo "<html><body><h1>Gallery Index</h1><ul>" > gallery/index.html
Expand All @@ -69,10 +74,10 @@ jobs:
echo "</ul></body></html>" >> 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: |
Expand Down
3 changes: 2 additions & 1 deletion r/install_packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
22 changes: 22 additions & 0 deletions r/install_quarto_extensions.expect
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fa2564f

Please sign in to comment.