Spaces:
Runtime error
Runtime error
Download .github/workflows/require_frontend_export.yml from hyper3labs/HyperView: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/spaces/hyper3labs/HyperView/resolve/23680f22d7bfa563f952a84ed66789691f407833/.github/workflows/require_frontend_export.yml
- Command line
-
hf download hf://spaces/hyper3labs/HyperView@23680f22d7bfa563f952a84ed66789691f407833/.github/workflows/require_frontend_export.yml
-
curl -L -o require_frontend_export.yml https://huggingface.co/spaces/hyper3labs/HyperView/resolve/23680f22d7bfa563f952a84ed66789691f407833/.github/workflows/require_frontend_export.yml
1.59 kB
| name: Require Frontend Export | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - "frontend/**" | |
| - "scripts/export_frontend.sh" | |
| - "src/hyperview/server/static/**" | |
| jobs: | |
| require-frontend-export: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Verify static export updated when frontend changes | |
| run: | | |
| set -euo pipefail | |
| base_sha="${{ github.event.pull_request.base.sha }}" | |
| head_sha="${{ github.event.pull_request.head.sha }}" | |
| changed_files="$(git diff --name-only "$base_sha" "$head_sha")" | |
| echo "Changed files:" | |
| echo "$changed_files" | |
| frontend_changed="false" | |
| static_changed="false" | |
| if echo "$changed_files" | grep -qE '^(frontend/|scripts/export_frontend\.sh$)'; then | |
| frontend_changed="true" | |
| fi | |
| if echo "$changed_files" | grep -q '^src/hyperview/server/static/'; then | |
| static_changed="true" | |
| fi | |
| if [[ "$frontend_changed" == "true" && "$static_changed" != "true" ]]; then | |
| echo "" | |
| echo "ERROR: frontend/ changed but src/hyperview/server/static/ was not updated." | |
| echo "Run: bash scripts/export_frontend.sh" | |
| echo "Then commit the updated src/hyperview/server/static/ output." | |
| exit 1 | |
| fi | |
| echo "OK: export requirements satisfied." | |