-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from flor14/update-2023
Update 2023
- Loading branch information
Showing
9 changed files
with
2,243 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
|
||
name: shiny-deploy | ||
|
||
jobs: | ||
shiny-deploy: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-renv@v2 | ||
|
||
- name: Install rsconnect | ||
run: install.packages("rsconnect") | ||
shell: Rscript {0} | ||
|
||
- name: Authorize and deploy app | ||
env: | ||
# Provide your app name, account name, and server to be deployed below | ||
APPNAME: feederwatch_app | ||
ACCOUNT: flor | ||
SERVER: shinyapps.io # server to deploy | ||
run: | | ||
rsconnect::setAccountInfo("${{ secrets.RSCONNECT_USER }}", "${{ secrets.RSCONNECT_TOKEN }}", "${{ secrets.RSCONNECT_SECRET }}") | ||
rsconnect::deployApp(appName = "${{ env.APPNAME }}", account = "${{ env.ACCOUNT }}", server = "${{ env.SERVER }}") | ||
shell: Rscript {0} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM rocker/r-base:4.2.1 | ||
|
||
# complete Linux packages with dockerfiler | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libicu-dev \ | ||
libpng-dev \ | ||
make \ | ||
pandoc \ | ||
zlib1g-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN addgroup --system app \ | ||
&& adduser --system --ingroup app app | ||
|
||
WORKDIR /home/shiny-app | ||
|
||
COPY . . | ||
|
||
RUN chown app:app -R /home/shiny-app | ||
|
||
USER app | ||
|
||
# Initialize new renv project | ||
RUN R -e "renv::init()" | ||
|
||
# Restore project dependencies | ||
RUN R -e "renv::restore()" | ||
|
||
# Expose port | ||
EXPOSE 3838 | ||
|
||
# Run command to start Shiny in the container | ||
CMD ["R", "-e", "shiny::runApp('/home/shiny-app', port = 3838, host = '0.0.0.0')"] |
Oops, something went wrong.