Add CRAN installation to README #89
This file contains hidden or 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
| name: Deploy pkgdown site | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-r@v2 | |
| - name: Cache R library | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ runner.os }}-R-${{ hashFiles('renv.lock', 'DESCRIPTION') }} | |
| restore-keys: | | |
| ${{ runner.os }}-R- | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::pkgdown | |
| - name: Install cmdstan | |
| run: | | |
| cmdstanr::check_cmdstan_toolchain(fix = TRUE) | |
| cmdstanr::install_cmdstan(cores = 2) | |
| shell: Rscript {0} | |
| - name: Build pkgdown site | |
| run: pkgdown::build_site() | |
| shell: Rscript {0} | |
| - name: Upload site artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/ | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |