Skip to content

Fix CMD check issues #38

Fix CMD check issues

Fix CMD check issues #38

name: Deploy to shinyapps.io
on:
# run on any push
push:
# run on request (via button in actions menu)
workflow_dispatch:
env:
_R_CHECK_FORCE_SUGGESTS_: "false"
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:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: eddelbuettel/github-actions/r-ci-setup@master
- name: Bootstrap
run: ./run.sh bootstrap
#- name: Dependencies
# run: ./run.sh install_deps
- name: All Dependencies
run: ./run.sh install_all
- name: Push to shiny.io
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
Rscript -e "
install.packages(c('rsconnect', 'remotes'));
bspm::disable();
remotes::install_github('forrtproject/FReD', force = TRUE);
rsconnect::setAccountInfo(name='forrt-replications', token=${{secrets.SHINYAPPS_TOKEN}}, secret=${{secrets.SHINYAPPS_SECRET}});
appDir <- system.file('fred_explorer', package = 'FReD');
rsconnect::deployApp(appDir, forceUpdate = TRUE);
appDir <- system.file('fred_annotator', package = 'FReD');
rsconnect::deployApp(appDir, forceUpdate = TRUE);
"
- name: Deploy release version conditionally
if: github.event_name == 'release' && github.event.release.tag_name != '*test*'
run: |
R -e "
appDir <- system.file('fred_explorer', package = 'FReD');
rsconnect::deployApp(appName = 'fred_explorer_release', appDir, forceUpdate = TRUE);
appDir <- system.file('fred_annotator', package = 'FReD');
rsconnect::deployApp(appName = 'fred_annotator_release', appDir, forceUpdate = TRUE);
"