Skip to content

Commit 843007e

Browse files
Update publish.yml
1 parent 4cfb23a commit 843007e

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

.github/workflows/publish.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
on:
22
push:
3-
branches:
4-
- main
3+
branches:
4+
- main
55

66
name: Deploy BrainEffeX app to shinyapps.io
77

88
jobs:
9-
deploy-shiny:
10-
name: Deploy to shinyapps.io
9+
deploy:
1110
runs-on: ubuntu-latest
12-
env:
13-
GITHUB_PAT: ${{ secrets.ACCESS_TOKEN }}
14-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
15-
11+
1612
steps:
17-
- name: 🛎️ Checkout repository
18-
uses: actions/checkout@v2
19-
with:
20-
fetch-depth: 0
21-
- id: deploy
22-
name: 💎 Deploy to shinyapps.io
23-
uses: qwert666/shinyapps-actions@main
24-
env:
25-
SHINY_USERNAME: 'halleeshearer'
26-
SHINY_TOKEN: ${{ secrets.TOKEN }}
27-
SHINY_SECRET: ${{ secrets.SECRET }}
28-
APP_NAME: 'BrainEffeX_auto'
29-
APP_DIR: ''
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Setup R
17+
uses: r-lib/actions/setup-r@v2
18+
19+
- name: Install rsconnect
20+
run: Rscript -e "install.packages('rsconnect')"
21+
22+
- name: Deploy to shinyapps.io
23+
env:
24+
SHINYAPPS_NAME: 'BrainEffeX_auto'
25+
SHINYAPPS_ACCOUNT: 'halleeshearer'
26+
SHINYAPPS_TOKEN: ${{ secrets.TOKEN }}
27+
SHINYAPPS_SECRET: ${{ secrets.SECRET }}
28+
run: |
29+
Rscript -e "rsconnect::setAccountInfo(name=Sys.getenv('SHINYAPPS_ACCOUNT'), token=Sys.getenv('SHINYAPPS_TOKEN'), secret=Sys.getenv('SHINYAPPS_SECRET'))"
30+
Rscript -e "rsconnect::deployApp(appDir='.', appName=Sys.getenv('SHINYAPPS_NAME'), force=TRUE)"

0 commit comments

Comments
 (0)