Skip to content

build(deps-dev): bump tsx from 4.21.0 to 4.22.1 #229

build(deps-dev): bump tsx from 4.21.0 to 4.22.1

build(deps-dev): bump tsx from 4.21.0 to 4.22.1 #229

Workflow file for this run

name: Deploy Demo to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install JS dependencies
run: npm ci
- name: Install docs dependencies
run: |
pip install mkdocs-material
- name: Build demo site
run: |
npx vite build --config demo/vite.demo.config.js
mkdir -p _site/demo/samples
cp demo/samples/*.wav _site/demo/samples/
cp demo/samples/README.md _site/demo/samples/ 2>/dev/null || true
- name: Build docs into /docs
run: |
mkdocs build --config-file mkdocs.yml --site-dir _site/docs
- name: Root redirect
run: |
cat > _site/index.html <<'EOF'
<!DOCTYPE html>
<meta charset="utf-8">
<h1>SignaVis</h1>
<ul>
<li><a href="demo/storybook.html">Demo / Storybook</a></li>
<li><a href="docs/">Dokumentation</a></li>
</ul>
EOF
- name: Write version.json for deployment
run: |
mkdir -p _site
VERSION="$(node -e "try{const p=require('./package.json'); console.log(p.version||'');}catch(e){console.log('')}")"
if [ -z "$VERSION" ] && [ -f VERSION ]; then
VERSION="$(cat VERSION)"
fi
COMMIT_SHORT="$(git rev-parse --short HEAD || echo '')"
COMMIT_FULL="$(git rev-parse HEAD || echo '')"
COMMIT_DATE="$(git show -s --format=%cI HEAD || date -u +"%Y-%m-%dT%H:%M:%SZ")"
BUILT_AT="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
printf '{"version":"%s","commit":"%s","commitFull":"%s","commitDate":"%s","builtAt":"%s"}\n' \
"$VERSION" "$COMMIT_SHORT" "$COMMIT_FULL" "$COMMIT_DATE" "$BUILT_AT" > _site/version.json
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: _site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5