Site Test #121
Workflow file for this run
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: Site Test | |
| on: | |
| pull_request: | |
| branches: [main] | |
| merge_group: | |
| types: [checks_requested] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: "Test" | |
| runs-on: ubuntu-latest | |
| env: | |
| TAILWIND_VERSION: 3.4.4 | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: filter | |
| with: | |
| # Make paths-filter support merge groups: | |
| # If merge_group, set base to compare against the target branch (main), | |
| # set the incoming ref to the merge group head ref. | |
| # | |
| # Adapted from here: https://github.com/dorny/paths-filter/pull/255#issuecomment-2730937516 | |
| # See also: https://github.com/dorny/paths-filter/pull/255 | |
| base: ${{ github.event_name == 'merge_group' && github.event.merge_group.base_ref || '' }} | |
| ref: ${{ github.event_name == 'merge_group' && github.event.merge_group.head_sha || github.ref }} | |
| filters: | | |
| site: | |
| - "site/**" | |
| - "sdk/python/src/**" | |
| - "sdk/python/pyproject.toml" | |
| - name: Install Zola | |
| if: steps.filter.outputs.site == 'true' | |
| uses: taiki-e/install-action@ca770cf74e8d33db1454f49b3c96ef207b36cc46 # zola | |
| with: | |
| tool: zola@0.20.0 | |
| - name: Install Tailwind CLI | |
| if: steps.filter.outputs.site == 'true' | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSLO https://github.com/tailwindlabs/tailwindcss/releases/download/v${TAILWIND_VERSION}/tailwindcss-linux-x64 | |
| chmod +x tailwindcss-linux-x64 | |
| mv tailwindcss-linux-x64 tailwindcss | |
| mkdir -p "${HOME}/.local/bin" | |
| mv tailwindcss "${HOME}/.local/bin/tailwindcss" | |
| echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
| - name: Install Deno | |
| if: steps.filter.outputs.site == 'true' | |
| uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3 | |
| with: | |
| deno-version: v2.x | |
| - name: Set up Python 3.10 | |
| if: steps.filter.outputs.site == 'true' | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.10" | |
| - name: Build and copy Python SDK docs | |
| if: steps.filter.outputs.site == 'true' | |
| run: | | |
| pip install uv | |
| mkdir site/static/sdk | |
| cd sdk/python/docs | |
| uv run make html | |
| cp -r ./build/html ../../../site/static/sdk/python | |
| - name: Build Hipcheck Website | |
| if: steps.filter.outputs.site == 'true' | |
| run: | | |
| cd site | |
| zola build | |
| tailwindcss -i styles/main.css -o public/main.css | |
| cd scripts | |
| deno task bundle |