add R example for passing parameters #38
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: Publish Website | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: main | |
| paths: | |
| - 'book/**.qmd' | |
| - 'book/**.yml' | |
| jobs: | |
| quarto: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Chrome for mermaid plots | |
| uses: browser-actions/setup-chrome@v1 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Install packages | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| packages: | | |
| any::knitr | |
| any::rmarkdown | |
| any::reticulate | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v1 | |
| - name: Render Website | |
| run: uv run quarto render book/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'book/_site' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@main |