Skip to content

fix: abs path

fix: abs path #11

name: Deploy JavaScript Examples to GitHub Pages
on:
push:
branches:
- dev # Or your default branch, e.g., 'main'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Enable Corepack to use the yarn version defined in package.json
- name: Enable Corepack
run: corepack enable
- name: Set up Node.js and Yarn
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install root dependencies
# This single command installs dependencies for the entire monorepo using Yarn.
# It respects your yarn.lock file and workspace setup.
run: yarn install --immutable
- name: Build all packages
# This runs the "build" script in your root package.json,
# which in turn runs `lerna run build`.
run: yarn run build
- name: Set up GitHub Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# The path is correct, pointing to your example app's build output
path: './examples/javascript/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4