Skip to content

Merge pull request #59 from lambdaclass/pr/8-analytical-member-offsets #671

Merge pull request #59 from lambdaclass/pr/8-analytical-member-offsets

Merge pull request #59 from lambdaclass/pr/8-analytical-member-offsets #671

name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build WASM engine
run: wasm-pack build --target web --out-dir ../web/src/lib/wasm --no-opt
working-directory: engine
- name: Install dependencies
working-directory: web
run: npm ci
- name: Build
working-directory: web
run: npm run build
env:
BASE_PATH: /
- name: Verify custom-domain asset paths
working-directory: web
run: |
test -f dist/index.html
if grep -Eq '="/stabileo/|='\''/stabileo/'\''' dist/index.html; then
echo "GitHub Pages build emitted /stabileo asset paths on the custom domain."
echo "Expected root-relative paths like /assets/... for stabileo.com."
exit 1
fi
if ! grep -Eq 'src="/assets/|href="/assets/' dist/index.html; then
echo "GitHub Pages build did not emit root-relative asset URLs."
exit 1
fi
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: web/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4