Skip to content

Add structured error API and CSV parsing support #21

Add structured error API and CSV parsing support

Add structured error API and CSV parsing support #21

Workflow file for this run

name: Build and Deploy to GitHub Pages
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout rayforce-wasm
uses: actions/checkout@v4
- name: Clone rayforce
run: |
git clone --depth 1 https://github.com/RayforceDB/rayforce.git src/rayforce-repo
echo "Rayforce commit: $(cd src/rayforce-repo && git rev-parse --short HEAD)"
echo "=== Verifying math.c direct call fix ==="
grep -c "return.*(obj_p" src/rayforce-repo/core/math.c
grep -n "obj_p(\*)" src/rayforce-repo/core/math.c | head -8
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: '3.1.5'
- name: Build WASM
run: |
echo "Emscripten version: $(emcc --version | head -1)"
RAYFORCE_SRC_DIR=src/rayforce-repo make wasm
echo "WASM size: $(ls -la dist/rayforce.wasm | awk '{print $5}')"
- name: Prepare deployment
run: |
mkdir -p _site
# Copy all dist files (WASM, JS, SDK)
cp dist/rayforce.js _site/
cp dist/rayforce.wasm _site/
cp dist/rayforce.sdk.js _site/
cp dist/rayforce.sdk.d.ts _site/
cp dist/rayforce.umd.js _site/
cp dist/index.js _site/
# Copy examples
cp examples/index.html _site/
cp examples/favicon.ico _site/
cp -r examples/assets _site/
# Fix import paths for flat structure
sed -i 's|../dist/rayforce.js|./rayforce.js|g' _site/index.html
sed -i 's|../dist/rayforce.sdk.js|./rayforce.sdk.js|g' _site/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4