/ proof-of-concept / numbl-web-ide
Sign in
proof-of-concept / numbl-web-ide
Build against a github.com clone of minwebide, at the vault base path
owner <owner@noreply.vault1.magland.org> committed commit 264fec925dd6 parent 684a53b Browse files
1 changed file+83−0
.cofferdam/workflows/deploy.ymladded+83−0View file
@@ -0,0 +1,83 @@
1+name: Deploy to Pages
2+
3+# The cofferdam version of .github/workflows/deploy.yml, which it shadows.
4+# Three differences, all forced by the vault:
5+#
6+# - `actions/checkout` with a `repository:` names a repository in this vault,
7+# so minwebide is cloned from github.com with git;
8+# - there is no cache service and no hashFiles(), so the VS Code source is
9+# fetched on every run rather than cached;
10+# - a cofferdam site is served at /<collection>/<repo>/site/, not at
11+# /<repo>/, so the base path comes from configure-pages (which therefore
12+# has to run before the build) rather than being written out by hand.
13+
14+on:
15+ push:
16+ branches: [main]
17+ workflow_dispatch:
18+
19+permissions:
20+ contents: read
21+ pages: write
22+ id-token: write
23+
24+concurrency:
25+ group: pages
26+ cancel-in-progress: false
27+
28+jobs:
29+ build:
30+ runs-on: ubuntu-latest
31+ steps:
32+ - name: Checkout numbl-web-ide
33+ uses: actions/checkout@v4
34+ with:
35+ path: numbl-web-ide
36+
37+ # minwebide is consumed as a sibling checkout (file:../minwebide)
38+ - name: Clone minwebide
39+ run: git clone --depth 1 https://github.com/magland/minwebide.git minwebide
40+
41+ - uses: actions/setup-node@v4
42+ with:
43+ node-version: 22
44+
45+ # Before the build rather than after it: the build needs the base path
46+ # this reports, and it is not the one GitHub would serve the site at.
47+ - name: Setup Pages
48+ id: pages
49+ uses: actions/configure-pages@v5
50+
51+ - name: Install minwebide (fetches VS Code source on postinstall)
52+ working-directory: minwebide
53+ env:
54+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
55+ run: npm ci
56+
57+ - name: Install numbl-web-ide
58+ working-directory: numbl-web-ide
59+ env:
60+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
61+ run: npm ci
62+
63+ - name: Build
64+ working-directory: numbl-web-ide
65+ env:
66+ DEPLOY_BASE: ${{ steps.pages.outputs.base_path }}/
67+ run: npm run build
68+
69+ - name: Upload artifact
70+ uses: actions/upload-pages-artifact@v3
71+ with:
72+ path: numbl-web-ide/dist
73+
74+ deploy:
75+ needs: build
76+ runs-on: ubuntu-latest
77+ environment:
78+ name: github-pages
79+ url: ${{ steps.deployment.outputs.page_url }}
80+ steps:
81+ - name: Deploy to Pages
82+ id: deployment
83+ uses: actions/deploy-pages@v4
↑↓ move↵openescclose