feat: Speed up get_color_contrast()
#2931
Workflow file for this run
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
# Workflow derived from https://github.com/rstudio/shiny-workflows | |
# | |
# NOTE: This Shiny team GHA workflow is overkill for most R packages. | |
# For most R packages it is better to use https://github.com/r-lib/actions | |
on: | |
push: | |
branches: [main, rc-**] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '0 5 * * 1' # every monday | |
name: Package checks | |
jobs: | |
website: | |
uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1 | |
routine: | |
uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1 | |
R-CMD-check: | |
uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1 | |
deploy: | |
if: github.repository == 'rstudio/bslib' && github.event_name == 'push' | |
runs-on: ubuntu-20.04 | |
name: "Deploy to shinyapps.io" | |
needs: [R-CMD-check] | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: rstudio/shiny-workflows/setup-r-package@v1 | |
with: | |
needs: deploy | |
# Install from GitHub so that rsconnect can find the package | |
- name: Install bslib from GitHub | |
shell: Rscript {0} | |
run: | | |
pak::pkg_install("rstudio/bslib", dependencies = TRUE, upgrade = TRUE) | |
# Workaround for this (probably spurious error): | |
# https://github.com/rstudio/bslib/actions/runs/4963164313/jobs/8882217868#step:6:32 | |
- name: Install rlang | |
shell: Rscript {0} | |
run: | | |
install.packages("rlang") | |
- name: Install cpp11 | |
shell: Rscript {0} | |
run: | | |
install.packages("cpp11") | |
- name: Register account(s) | |
shell: Rscript {0} | |
run: | | |
rsconnect::setAccountInfo( | |
name = '${{ secrets.SHINYAPPS_NAME }}', | |
token = '${{ secrets.SHINYAPPS_TOKEN }}', | |
secret = '${{ secrets.SHINYAPPS_SECRET }}' | |
) | |
rsconnect::setAccountInfo( | |
name = 'bslib', | |
token = '${{ secrets.SHINYAPPS_BSLIB_TOKEN }}', | |
secret = '${{ secrets.SHINYAPPS_BSLIB_SECRET }}' | |
) | |
- name: Deploy | |
shell: bash | |
run: | | |
deployScripts=$(find inst -name "deploy.R" -type f) | |
for deployScript in $deployScripts; do | |
echo "Deploying $deployScript" | |
Rscript $deployScript | |
done |