Skip to content

Commit

Permalink
Merge pull request #215 from ESHackathon/fix_deploy
Browse files Browse the repository at this point in the history
Fix both deploy actions
  • Loading branch information
LukasWallrich authored Nov 9, 2024
2 parents 12fe644 + b72a9e8 commit 3df668f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/document-and-deploy-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
with:
r-version: ${{ github.event.inputs.rversion }}

- name: Set up System Dependencies
uses: r-lib/actions/setup-r-dependencies@v2

- name: Create documentation
run: |
R -e "
Expand All @@ -49,7 +52,7 @@ jobs:
git push origin || echo "No changes to commit"
- name: Deploy latest from dev
if: ${{ github.ref_name }} == 'dev'
if: github.ref == 'refs/heads/dev'
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -60,7 +63,7 @@ jobs:
rsconnect::deployApp(appName = 'CiteSource_latest', appDir = './inst/shiny-app/CiteSource', forceUpdate = TRUE)"
- name: Deploy stable version from main
if: ${{ github.ref_name }} == 'main' || ${{ github.ref_name }} == 'master'
if: github.ref == 'refs/heads/main'
run: |
R -e "
install.packages(c('rsconnect', 'remotes'));
Expand All @@ -71,7 +74,8 @@ jobs:
- name: Create pkgdown
run: |
R -e "
install.packages('pkgdown');
install.packages('pkgdown');
if (!require(CiteSource)) remotes::install_github('ESHackathon/CiteSource', force = TRUE);
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)"
- name: Deploy to GitHub pages 🚀
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/document-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,38 @@ 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'
if: github.ref == 'refs/heads/main'
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
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
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
R -e "
install.packages('pkgdown');
bspm::disable();
if (!require(CiteSource)) remotes::install_github('ESHackathon/CiteSource', force = TRUE);
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)"
- name: Deploy to GitHub pages 🚀
Expand Down

0 comments on commit 3df668f

Please sign in to comment.