Skip to content

Commit

Permalink
Fix deploy action to run and deploy dev version correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasWallrich committed Nov 9, 2024
1 parent 12fe644 commit 39655c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/document-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,26 @@ jobs:
git commit -m 'Documentation' || echo "No changes to commit"
git push origin || echo "No changes to commit"
- name: Deploy latest
if: github.ref == 'refs/heads/dev' (from dev)
- name: Deploy latest (from dev)
if: github.ref == 'refs/heads/dev'
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
R -e "
install.packages(c('rsconnect', 'remotes'));
bspm::disable();
remotes::install_github('ESHackathon/CiteSource', force = TRUE);
remotes::install_github('ESHackathon/CiteSource', ref = "dev", force = TRUE);
rsconnect::setAccountInfo(name=${{secrets.SHINY_LUKAS_ACCOUNT}}, token=${{secrets.SHINY_LUKAS_TOKEN}}, secret=${{secrets.SHINY_LUKAS_SECRET}});
rsconnect::deployApp(appName = 'CiteSource_latest', appDir = './inst/shiny-app/CiteSource', forceUpdate = TRUE)"
- name: Deploy stable version (from main)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
run: |
R -e "
install.packages(c('rsconnect', 'remotes'));
bspm::disable();
remotes::install_github('ESHackathon/CiteSource', force = TRUE);
rsconnect::setAccountInfo(name=${{secrets.SHINY_LUKAS_ACCOUNT}}, token=${{secrets.SHINY_LUKAS_TOKEN}}, secret=${{secrets.SHINY_LUKAS_SECRET}});
rsconnect::deployApp(appName = 'CiteSource', appDir = './inst/shiny-app/CiteSource', forceUpdate = TRUE)"
- name: Create pkgdown
Expand Down

0 comments on commit 39655c3

Please sign in to comment.