Skip to content

fix(glyph): keep multiline template-literal content verbatim in inter… #2449

fix(glyph): keep multiline template-literal content verbatim in inter…

fix(glyph): keep multiline template-literal content verbatim in inter… #2449

Workflow file for this run

name: Deploy docs
on:
push:
branches:
- main
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build-docs:
runs-on: blacksmith-32vcpu-ubuntu-2404
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Setup Wild linker
uses: wild-linker/action@0bbbfa5df4380cab8e63cb8505a1ce65e1d10203 # v0.9.0
with:
wild-version: "0.9.0"
- uses: ./.github/actions/setup-rust-sticky-cache
with:
key: docs-napi
cache-key-suffix: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Cargo.lock') }}
- name: Setup Vite+ and Node.js
uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1
with:
node-version-file: ".node-version"
cache: true
run-install: false
- uses: ./.github/actions/setup-moonbit
- name: Install JS dependencies
run: moon run --target native tools/moon/cmd/github/vp_install -- --filter './docs...' --filter './npm/builder/vite...' --filter './npm/cli...' --filter './npm/native...'
- name: Build @vizejs/vite-plugin
run: moon run --target native tools/moon/cmd/github/run_many -- vp run --filter './npm/native' build:ci -- vp run --filter './npm/cli' build -- vp run --filter './npm/builder/vite' build
- name: Build docs
run: vp run --filter './docs' build
- name: Upload docs artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs
path: docs/dist
build-playground:
runs-on: blacksmith-32vcpu-ubuntu-2404
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
targets: wasm32-unknown-unknown
- name: Setup Wild linker
uses: wild-linker/action@0bbbfa5df4380cab8e63cb8505a1ce65e1d10203 # v0.9.0
with:
wild-version: "0.9.0"
- uses: ./.github/actions/setup-moonbit
- uses: ./.github/actions/setup-rust-sticky-cache
with:
key: docs-wasm
cache-key-suffix: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Cargo.lock') }}
- name: Cache WASM build
id: cache-wasm
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
npm/wasm
playground/src/wasm
key: ${{ runner.os }}-docs-wasm-${{ hashFiles('crates/**/*.rs', 'Cargo.lock', 'npm/wasm/package.json') }}
- name: Install wasm-bindgen-cli
if: steps.cache-wasm.outputs.cache-hit != 'true'
uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2
with:
tool: wasm-bindgen-cli@0.2.121
- name: Build WASM
if: steps.cache-wasm.outputs.cache-hit != 'true'
run: moon run --target native tools/moon/cmd/github/build_vitrine_wasm -- npm/wasm playground/src/wasm
- name: Setup Vite+ and Node.js
uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1
with:
node-version-file: ".node-version"
cache: true
run-install: false
- name: Install JS dependencies
run: moon run --target native tools/moon/cmd/github/vp_install -- --filter './playground...' --filter './examples/vite-musea...' --filter './npm/builder/vite-musea...' --filter './npm/builder/vite...' --filter './npm/cli...' --filter './npm/native...'
- name: Build npm packages
run: moon run --target native tools/moon/cmd/github/run_many -- vp run --filter './npm/native' build:ci -- vp run --filter './npm/cli' build -- vp run --filter './npm/builder/vite' build -- vp run --filter './npm/builder/vite-musea' build
- name: Build playground
run: vp run --filter './playground' build
- name: Clean musea example Rust target
run: cargo clean --target-dir target/docs-example
- name: Build musea-examples
run: vp run --filter './examples/vite-musea' build
- name: Upload playground artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: playground
path: playground/dist
- name: Upload musea-examples artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: musea-examples
path: examples/vite-musea/dist
deploy:
runs-on: blacksmith-32vcpu-ubuntu-2404
needs: [build-docs, build-playground]
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
- uses: ./.github/actions/setup-moonbit
- name: Create site structure
run: moon run --target native tools/moon/cmd/github/create_site_structure --
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Upload pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
name: github-pages-${{ github.run_attempt }}
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
with:
artifact_name: github-pages-${{ github.run_attempt }}