/ proof-of-concept / numbl-web-ide
Sign in
proof-of-concept / numbl-web-ide
numbl-web-ide / .cofferdam / workflows / deploy.yml
83 lines · 2.3 KBCodeBlameHistory
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.
14on:
15 push:
16 branches: [main]
17 workflow_dispatch:
19permissions:
20 contents: read
21 pages: write
22 id-token: write
24concurrency:
25 group: pages
26 cancel-in-progress: false
28jobs:
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
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
41 - uses: actions/setup-node@v4
42 with:
43 node-version: 22
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
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
57 - name: Install numbl-web-ide
58 working-directory: numbl-web-ide
59 env:
60 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
61 run: npm ci
63 - name: Build
64 working-directory: numbl-web-ide
65 env:
66 DEPLOY_BASE: ${{ steps.pages.outputs.base_path }}/
67 run: npm run build
69 - name: Upload artifact
70 uses: actions/upload-pages-artifact@v3
71 with:
72 path: numbl-web-ide/dist
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