Clone numbl from github.com in a cofferdam-side workflow
1 changed file+78−0
.cofferdam/workflows/deploy.ymladded+78−0View file
@@ -0,0 +1,78 @@
1+name: Deploy to Pages
2+
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.
8+
9+on:
10+ push:
11+ branches: [main]
12+ schedule:
13+ - cron: "0 6 * * *"
14+ workflow_dispatch:
15+
16+permissions:
17+ contents: read
18+ pages: write
19+ id-token: write
20+
21+concurrency:
22+ group: pages
23+ cancel-in-progress: false
24+
25+jobs:
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
37+
38+ - name: Clone numbl (main)
39+ run: git clone --depth 1 --branch main https://github.com/flatironinstitute/numbl.git numbl
40+
41+ - uses: actions/setup-node@v4
42+ with:
43+ node-version: 22
44+
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
55+
56+ - name: Install app dependencies
57+ working-directory: concept-collection/numbl-figure-viewer
58+ run: npm install
59+
60+ - name: Build app
61+ working-directory: concept-collection/numbl-figure-viewer
62+ run: npm run build:pages
63+
64+ - uses: actions/configure-pages@v5
65+
66+ - uses: actions/upload-pages-artifact@v3
67+ with:
68+ path: concept-collection/numbl-figure-viewer/dist
69+
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