Clarify README introduction #10
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: Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/configure-pages@v5 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| - name: Prepare site | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p site/auxiliary | |
| mkdir -p site/metrics | |
| curl -L --fail \ | |
| -o site/auxiliary/nabla-glow.svg \ | |
| https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/releases/download/pages-assets/nabla-glow.svg | |
| curl -L --fail \ | |
| -o site/auxiliary/externaldata-flow-kitware.jpg \ | |
| https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/releases/download/pages-assets/externaldata-flow-kitware.jpg | |
| git clone --quiet https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Module.git repo-size-check | |
| python - <<'PY' | |
| import json | |
| from pathlib import Path | |
| pack_dir = Path("repo-size-check/.git/objects/pack") | |
| total = sum(path.stat().st_size for path in pack_dir.glob("*")) | |
| kib = (total + 1023) // 1024 | |
| payload = { | |
| "schemaVersion": 1, | |
| "label": "repo size", | |
| "message": f"{kib} KiB", | |
| "color": "blue", | |
| } | |
| Path("site/metrics/repo-size.json").write_text(json.dumps(payload), encoding="utf-8") | |
| PY | |
| printf '%s\n' '<!doctype html><meta charset="utf-8"><title>Nabla Asset Module Pages</title>' > site/index.html | |
| touch site/.nojekyll | |
| - uses: actions/upload-pages-artifact@v4 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| with: | |
| path: site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' |