v0.9.0 #108
Workflow file for this run
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: CI Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
inputs: | |
publish_pages: | |
description: "Publish Documentation Website" | |
required: false | |
type: boolean | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "22" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Setup emsdk | |
uses: mymindstorm/setup-emsdk@v14 | |
with: | |
version: 4.0.13 | |
- name: Setup Rust for WebAssembly | |
run: | | |
rustup target add wasm32-unknown-unknown | |
cargo install -f wasm-bindgen-cli --version 0.2.100 | |
- name: Set up uv package manager | |
uses: astral-sh/setup-uv@v5 | |
- name: Install dependencies | |
run: npm ci | |
- uses: actions/cache@v4 | |
id: cache-demo-data | |
with: | |
path: packages/docs/demo-data | |
key: ${{ runner.os }}-${{ hashFiles('packages/docs/generate_demo_data.py') }} | |
- name: Generate demo data | |
if: steps.cache-demo-data.outputs.cache-hit != 'true' | |
run: cd packages/docs && uv run generate_demo_data.py | |
- name: Build WASM modules | |
run: ./scripts/build_wasm.sh | |
- name: Build JavaScript and Python packages | |
run: ./scripts/build.sh | |
- name: Run tests | |
run: ./scripts/test.sh | |
- name: Upload node package artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: node-dist | |
path: packages/embedding-atlas/ | |
- name: Upload python package artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-dist | |
path: packages/backend/dist/ | |
- name: Upload docs artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: packages/docs/.vitepress/dist/ | |
publish-pypi: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' | |
needs: | |
- build | |
permissions: | |
id-token: write | |
environment: | |
name: pypi | |
url: https://pypi.org/p/embedding-atlas | |
steps: | |
- name: Retrieve release distributions | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-dist | |
path: dist/ | |
- name: Publish release distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: dist/ | |
publish-npmjs: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' | |
needs: | |
- build | |
permissions: | |
contents: read | |
id-token: write | |
environment: | |
name: npmjs | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Retrieve release distributions | |
uses: actions/download-artifact@v4 | |
with: | |
name: node-dist | |
path: package/ | |
- run: cd package && npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
publish-pages: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' || inputs.publish_pages == true | |
needs: | |
- build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |