Tobi dashboard and update (#14) #53
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 Publish | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint with Prettier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check formatting | |
| run: npm run check | |
| build-optimize: | |
| name: Build, optimize, and upload artifacts | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Install R dependencies | |
| run: Rscript -e 'install.packages("processx")' | |
| - name: Set up Chrome | |
| id: setup-chrome | |
| uses: browser-actions/setup-chrome@v1 | |
| - name: Expose Chrome as google-chrome | |
| run: sudo ln -s "${{ steps.setup-chrome.outputs.chrome-path }}" /usr/local/bin/google-chrome | |
| - name: Sync Python environment | |
| run: uv sync | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Render Quarto project | |
| run: uv run quarto render | |
| - name: JamPack optimization | |
| run: npx @divriots/jampack ./_site | |
| - name: Upload built site artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: built-site | |
| path: _site | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: _site | |
| deploy: | |
| name: Deploy | |
| if: github.event_name != 'pull_request' | |
| needs: build-optimize | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |