update data files #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Shiny App | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.2.2' | |
| - name: Cache R packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cache/R | |
| ~/.local/share/renv | |
| ~/R | |
| key: ${{ runner.os }}-r-${{ hashFiles('**/renv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-r- | |
| - name: Install system libraries | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libcurl4-openssl-dev libssl-dev | |
| - name: Install packages | |
| run: | | |
| R -e ' | |
| options(repos = c(CRAN="https://cloud.r-project.org")) | |
| install.packages("renv") | |
| renv::restore() | |
| ' | |
| - name: Deploy to shinyapps.io | |
| run: | | |
| R -e ' | |
| options(rsconnect.packrat = FALSE) | |
| options(repos = c(CRAN="https://cloud.r-project.org")) | |
| rsconnect::setAccountInfo( | |
| name = Sys.getenv("SHINYAPPS_NAME"), | |
| token = Sys.getenv("SHINYAPPS_TOKEN"), | |
| secret = Sys.getenv("SHINYAPPS_SECRET") | |
| ) | |
| rsconnect::deployApp( | |
| appDir = "R", | |
| appName="ACEapp", | |
| forceUpdate = TRUE | |
| ) | |
| ' | |
| env: | |
| SHINYAPPS_NAME: ${{ secrets.SHINYAPPS_NAME }} | |
| SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }} | |
| SHINYAPPS_SECRET: ${{ secrets.SHINYAPPS_SECRET }} |