|
87 | 87 | run: > |
88 | 88 | Rscript |
89 | 89 | -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")' |
| 90 | +
|
| 91 | +
|
| 92 | +
|
| 93 | +
|
| 94 | + deploy: |
| 95 | + if: github.repository == 'rstudio/learnr' && github.event_name == 'push' |
| 96 | + runs-on: ${{ matrix.config.os }} |
| 97 | + |
| 98 | + name: "Deploy to shinyapps.io" |
| 99 | + needs: [R-CMD-check] |
| 100 | + |
| 101 | + strategy: |
| 102 | + fail-fast: false |
| 103 | + matrix: |
| 104 | + config: |
| 105 | + - {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} |
| 106 | + |
| 107 | + env: |
| 108 | + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
| 109 | + CRAN: ${{ matrix.config.cran }} |
| 110 | + |
| 111 | + steps: |
| 112 | + - uses: actions/checkout@v1 |
| 113 | + |
| 114 | + - uses: r-lib/actions/setup-r@master |
| 115 | + with: |
| 116 | + r-version: ${{ matrix.config.r }} |
| 117 | + |
| 118 | + - uses: r-lib/actions/setup-pandoc@master |
| 119 | + |
| 120 | + - name: Query dependencies |
| 121 | + run: > |
| 122 | + Rscript |
| 123 | + -e "install.packages('remotes')" |
| 124 | + -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds', version = 2)" |
| 125 | +
|
| 126 | + - name: Cache R packages |
| 127 | + if: runner.os != 'Windows' |
| 128 | + uses: actions/cache@v1 |
| 129 | + with: |
| 130 | + path: ${{ env.R_LIBS_USER }} |
| 131 | + key: ${{ runner.os }}-r-${{ matrix.config.r }}-deploy-${{ hashFiles('depends.Rds') }} |
| 132 | + restore-keys: | |
| 133 | + ${{ runner.os }}-r-${{ matrix.config.r }}-deploy- |
| 134 | + ${{ runner.os }}-r-${{ matrix.config.r }}- |
| 135 | +
|
| 136 | + - name: Install dependencies |
| 137 | + run: > |
| 138 | + Rscript |
| 139 | + -e "library(remotes)" |
| 140 | + -e "update(readRDS('depends.Rds'))" |
| 141 | + -e "remotes::install_cran('sortable')" |
| 142 | +
|
| 143 | + - name: Deploy |
| 144 | + env: |
| 145 | + SHINYAPPS_NAME: ${{ secrets.SHINYAPPS_NAME }} |
| 146 | + SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }} |
| 147 | + SHINYAPPS_SECRET: ${{ secrets.SHINYAPPS_SECRET }} |
| 148 | + run: > |
| 149 | + Rscript 'tools/deploy_tutorials_on_ci.R' |
0 commit comments