Merge pull request #3 from DatasunriseOU/codex/self-hosted-workflows #226
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Visual Builder static demo to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "vbgui/**" | |
| - "cppmega_v4/widget/**" | |
| - "cppmega_v4/spec/**" | |
| - "cppmega_v4/buildspec/**" | |
| - "cppmega_v4/parallelism/**" | |
| - "cppmega_v4/fusion/**" | |
| - "cppmega_v4/probe/**" | |
| - "cppmega_v4/jsonrpc/**" | |
| - "cppmega_v4/runner/**" | |
| - ".github/workflows/vbgui-pages.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: [self-hosted, Linux, X64, cppmega-mlx] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node 22 | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: vbgui/package-lock.json | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Install JupyterLite + Pyodide kernel | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install jupyterlite-core jupyterlite-pyodide-kernel jupyter-server | |
| - name: Build standalone Vite bundle | |
| working-directory: vbgui | |
| env: | |
| NODE_ENV: development | |
| run: | | |
| npm ci | |
| npm run typecheck | |
| npm test | |
| npm run build | |
| npm run build:widget | |
| - name: Build JupyterLite static site | |
| working-directory: vbgui/jupyterlite | |
| run: jupyter lite build --output-dir ../site/jupyterlite | |
| - name: Stage Pages payload | |
| run: | | |
| mkdir -p vbgui/site | |
| cp -r vbgui/dist/* vbgui/site/ | |
| test -d vbgui/site/jupyterlite | |
| - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 | |
| with: | |
| path: vbgui/site | |
| deploy: | |
| needs: build | |
| runs-on: [self-hosted, Linux, X64, cppmega-mlx] | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 |