Convert repository into a Quarto website #956
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: Quarto Preview | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - closed | |
| paths: | |
| - 'man/**' | |
| - 'pkgdown/**' | |
| - 'vignettes/**' | |
| - '_quarto*.yml' | |
| - '.github/workflows/preview.yml' | |
| - '.github/workflows/publish.yml' | |
| - '*.qmd' | |
| concurrency: preview-${{ github.ref }} | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| tinytex: true | |
| - uses: r-lib/actions/setup-r@HEAD | |
| with: | |
| use-public-rspm: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y jags libcurl4-openssl-dev libpng-dev libfontconfig1-dev libjpeg-dev | |
| - uses: r-lib/actions/setup-renv@v2 | |
| - name: Install local package | |
| run: | | |
| R CMD INSTALL . | |
| shell: bash | |
| - name: Render | |
| if: github.event.action != 'closed' # skip the build if the PR has been closed | |
| uses: quarto-dev/quarto-actions/render@v2 | |
| - name: list files | |
| shell: bash | |
| run: | | |
| echo "contents of _site:\n" | |
| ls _site/ | |
| echo "contents of .:\n" | |
| ls . | |
| - name: Deploy PR Preview | |
| uses: rossjrw/pr-preview-action@main | |
| with: | |
| source-dir: _site/ | |