/ proof-of-concept / plate-mechanics-sim
Sign in
proof-of-concept / plate-mechanics-sim
plate-mechanics-sim / .mochi / workflows / deploy.yml
71 lines · 1.7 KBBlameHistoryRaw
1name: Deploy the lab
3# Only apps/lab is published. apps/tutorials builds in the same workspace and is
4# left out of the artifact deliberately; it is a separate site if it ever wants one.
5#
6# configure-pages runs before the build rather than after it, because the build
7# needs the base path it reports: a mochi site is served at the root of its own
8# origin when the repository has a site label, and under /<collection>/<repo>/site/
9# when it does not, and never at /<repo>/.
11on:
12 push:
13 branches: [main]
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 - name: Checkout
30 uses: actions/checkout@v4
32 - name: Setup Node
33 uses: actions/setup-node@v4
34 with:
35 node-version: 22
37 - name: Setup Pages
38 id: pages
39 uses: actions/configure-pages@v5
41 - name: Install
42 run: npm ci
44 - name: Typecheck
45 run: npm run typecheck
47 # Runs the .m library under numbl in Node: modal against finite differences,
48 # the CFL bound, the mode frequencies. A regression here should not deploy.
49 - name: Test
50 run: npm test
52 - name: Build the lab
53 env:
54 DEPLOY_BASE: ${{ steps.pages.outputs.base_path }}
55 run: npm run build -w apps/lab
57 - name: Upload artifact
58 uses: actions/upload-pages-artifact@v3
59 with:
60 path: apps/lab/dist
62 deploy:
63 needs: build
64 runs-on: ubuntu-latest
65 environment:
66 name: github-pages
67 url: ${{ steps.deployment.outputs.page_url }}
68 steps:
69 - name: Deploy to Pages
70 id: deployment
71 uses: actions/deploy-pages@v4
↑↓ move↵openescclose