Dashboard index order (#27) #91
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@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| 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@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| 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@v8.1.0 | |
| - 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@v2 | |
| - 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: Install lychee | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: lychee | |
| - name: Fetch Matomo usage snapshot | |
| env: | |
| MATOMO_TOKEN_AUTH: ${{ secrets.MATOMO_TOKEN_AUTH }} | |
| MATOMO_BASE_URL: ${{ vars.MATOMO_BASE_URL }} | |
| MATOMO_SITE_ID: ${{ vars.MATOMO_SITE_ID }} | |
| MATOMO_PUBLIC_SITE_URL: ${{ vars.MATOMO_PUBLIC_SITE_URL }} | |
| MATOMO_REPORT_START_DATE: ${{ vars.MATOMO_REPORT_START_DATE }} | |
| run: uv run python scripts/fetch_matomo_usage.py | |
| - name: Run validation suite | |
| run: npm run validate | |
| - name: JamPack optimization | |
| run: npm run jampack | |
| - name: Upload built site artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: built-site | |
| path: _site | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| 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@v5 |