https://github.com/RMHogervorst/testshiny
https://github.com/RMHogervorst/testshiny
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/RMHogervorst/testshiny
- Owner: RMHogervorst
- Created: 2021-02-26T14:25:00.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-27T17:35:41.000Z (about 4 years ago)
- Last Synced: 2024-08-13T07:13:42.479Z (8 months ago)
- Language: R
- Size: 93.8 KB
- Stars: 17
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - RMHogervorst/testshiny - (R)
README
## Auto deploying an app to shinyapps.io
This is the demo shiny app and is very lame, but the major point is
the github actions that are used here to deploy after each commit in main/master.
and ends up at `https://rmhogervorst.shinyapps.io/mastershiny/`
AND it deploys at every PR and pushes to a different app. `https://rmhogervorst.shinyapps.io/testshiny/`This current version is pretty ugly, but it works.
In your github repo set up your secrets SHINY_ACC_NAME, TOKEN,SECRET,MASTERNAME, and TESTNAME.
In your local .Renviron file
```
SHINY_ACC_NAME="youraccountname"
TOKEN="atokenyougotfromshinyapps.io"
SECRET="asecretyourecievedfromshinyapps.io"
MASTERNAME="thiswillbethelastpartoftheurl"
TESTNAME="thiswillbethelastpartoftheurl"
```Your master/main url will be `https://{SHINY_ACC_NAME}.shinyapps.io/{MASTERNAME}/`
and for PRs the URL will be `https://{SHINY_ACC_NAME}.shinyapps.io/{TESTNAME}/`Set secrets in github in repository secrets
test docker image locally with
```
IMAGENAME=
docker build -t $IMAGENAME .
docker run --env-file .Renviron $IMAGENAME
```