1name: Deploy to Pages
3# The cofferdam version of .github/workflows/deploy.yml, which it shadows.
4# Two differences, both forced by the vault: `actions/checkout` with a
5# `repository:` names a repository in this vault, so numbl is cloned from
6# github.com with git; and there is no cache service, so `cache: npm` is
7# dropped rather than warned about on every run.
9on:
10 push:
11 branches: [main]
12 schedule:
13 - cron: "0 6 * * *"
14 workflow_dispatch:
16permissions:
17 contents: read
18 pages: write
19 id-token: write
21concurrency:
22 group: pages
23 cancel-in-progress: false
25jobs:
26 build:
27 runs-on: ubuntu-latest
28 steps:
29 # Lay the two repos out as siblings matching local dev:
30 # <workspace>/concept-collection/numbl-figure-viewer (this app)
31 # <workspace>/numbl (numbl main)
32 # so the app's `"numbl": "file:../../numbl"` resolves to <workspace>/numbl.
33 - name: Checkout app
34 uses: actions/checkout@v4
35 with:
36 path: concept-collection/numbl-figure-viewer
38 - name: Clone numbl (main)
39 run: git clone --depth 1 --branch main https://github.com/flatironinstitute/numbl.git numbl
41 - uses: actions/setup-node@v4
42 with:
43 node-version: 22
45 # Build the numbl/graphics browser bundle the app imports. (HUSKY=0 skips
46 # the git-hook setup in numbl's prepare script; numbl's own install script
47 # is a no-op, so no native addon is built.)
48 - name: Build numbl/graphics
49 working-directory: numbl
50 env:
51 HUSKY: 0
52 run: |
53 npm ci
54 npm run build:graphics
56 - name: Install app dependencies
57 working-directory: concept-collection/numbl-figure-viewer
58 run: npm install
60 - name: Build app
61 working-directory: concept-collection/numbl-figure-viewer
62 run: npm run build:pages
64 - uses: actions/configure-pages@v5
66 - uses: actions/upload-pages-artifact@v3
67 with:
68 path: concept-collection/numbl-figure-viewer/dist
70 deploy:
71 needs: build
72 runs-on: ubuntu-latest
73 environment:
74 name: github-pages
75 url: ${{ steps.deployment.outputs.page_url }}
76 steps:
77 - id: deployment
78 uses: actions/deploy-pages@v4