/ concept-collection / math-webgpu-sandbox
Sign in
concept-collection / math-webgpu-sandbox
math-webgpu-sandbox / .github / workflows / deploy.yml
52 lines · 1.6 KBBlameHistoryRaw
1name: deploy
2on:
3 push:
4 branches: [main]
5 workflow_dispatch:
7permissions:
8 contents: read
9 pages: write
10 id-token: write
12concurrency:
13 group: pages
14 cancel-in-progress: true
16jobs:
17 build-deploy:
18 runs-on: ubuntu-latest
19 environment:
20 name: github-pages
21 url: ${{ steps.deployment.outputs.page_url }}
22 steps:
23 - uses: actions/checkout@v4
24 - uses: actions/setup-node@v4
25 with:
26 node-version: 24
27 cache: npm
28 # See ci.yml for why numbl is cloned and dist-browser built.
29 - name: Check out numbl (sibling dependency)
30 env:
31 NUMBL_REF: 38ce14046d64d03ecf05cb57def53057a6bc64ab
32 run: |
33 git clone --filter=blob:none --no-checkout \
34 https://github.com/flatironinstitute/numbl.git "$GITHUB_WORKSPACE/../../numbl"
35 git -C "$GITHUB_WORKSPACE/../../numbl" checkout --quiet "$NUMBL_REF"
36 - name: Build numbl/browser (dist-browser)
37 run: |
38 cd "$GITHUB_WORKSPACE/../../numbl"
39 npm ci --ignore-scripts
40 npm run build:browser
41 - run: npm ci --ignore-scripts
42 - run: npm run test:node -- --skip-without-gpu
43 - run: npm run build
44 # Pages must already be enabled with "GitHub Actions" as the source; the
45 # workflow token cannot create the site itself (`enablement: true` fails
46 # with "Resource not accessible by integration").
47 - uses: actions/configure-pages@v5
48 - uses: actions/upload-pages-artifact@v3
49 with:
50 path: dist
51 - id: deployment
52 uses: actions/deploy-pages@v4
moveopenescclose