Repository navigation
Render and Deploy Website #156
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: Render and Deploy Website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: deploy-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Setup R package dependencies (cached) | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| packages: | | |
| any::gh | |
| any::knitr | |
| any::data.tree | |
| any::rvest | |
| any::DT | |
| any::jsonlite | |
| - name: Render website | |
| run: quarto render | |
| - name: Check internal links | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: --offline --no-progress _site/**/*.html | |
| - name: Deploy to gh-pages branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: _site | |
| publish_branch: gh-pages | |
| force_orphan: true |