Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

name: Deploy to shinyapps.io
on:
# run on any push
push:
# run on request (via button in actions menu)
workflow_dispatch:
jobs:
deploy:
name: Deploy to shinyapps
# allow skipping deployment for commits containing '[automated]' or '[no-deploy]' in the commit message
if: "!contains(github.event.head_commit.message, '[automated]') && !contains(github.event.head_commit.message, '[no-deploy]')"
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code from the repository
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2-branch
# Step 2: Install the required Debian packages
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y librsvg2-dev
sudo apt install cmake
# Step 3: Verify that pkg-config can find the libraries
- name: Verify pkg-config for librsvg
run: |
pkg-config --modversion librsvg-2.0
# Step 4: Install R packages
- name: Install shiny
run: |
install.packages(c("shiny",
"renv",
"rsconnect",
"rsvg",
"shinycssloaders",
"tidyverse",
"svglite",
"plotly",
"ggcorrplot",
"DT",
"broom",
"ggpp",
"ggpubr",
"gridExtra",
"grid",
"foreach",
"shinyjs",
"lubridate",
"emojifont",
"showtext",
"patchwork",
"IRkernel"))
shell: Rscript {0}
# Step 5: Deploy to shinyapps.io
- name: Push to shiny.io
run: |
"rsconnect::setAccountInfo(name='easyeyes', token=${{secrets.TOKEN}}, secret=${{secrets.SECRET}})"
"rsconnect::deployApp(appName = 'easyeyes_app')"
shell: Rscript {0}