|
# Deploy WebAssembly cockle and terminal builds to github pages |
|
name: Deploy wasm to github pages |
|
|
|
on: |
|
push: |
|
branches: |
|
- main |
|
workflow_dispatch: |
|
|
|
concurrency: |
|
group: ${{ github.workflow }}-${{ github.ref }} |
|
cancel-in-progress: true |
|
|
|
jobs: |
|
build: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@v7 |
|
|
|
- name: Setup Python |
|
uses: actions/setup-python@v6 |
|
with: |
|
python-version: '3.14' |
|
|
|
- name: Install mamba |
|
uses: mamba-org/setup-micromamba@v3 |
|
with: |
|
environment-file: wasm/wasm-environment.yml |
|
cache-environment: true |
|
|
|
- name: Build the cockle and JupyterLite terminal deployments |
|
shell: bash -l {0} |
|
working-directory: wasm |
|
run: | |
|
cmake . |
|
make |
|
|
|
- name: Upload artifact |
|
uses: actions/upload-pages-artifact@v5 |
|
with: |
|
path: ./wasm/serve/dist |
|
|
|
deploy: |
|
needs: build |
|
if: github.ref == 'refs/heads/main' |
|
permissions: |
|
pages: write |
|
id-token: write |
|
|
|
environment: |
|
name: github-pages |
|
url: ${{ steps.deployment.outputs.page_url }} |
|
|
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Deploy to GitHub Pages |
|
id: deployment |
|
uses: actions/deploy-pages@v5 |