Skip to content

Complete Rust runtime rewrite: Full compiler with Type Checker, WASM Codegen, and CI/CD Pipelines - 100% complete #22

Complete Rust runtime rewrite: Full compiler with Type Checker, WASM Codegen, and CI/CD Pipelines - 100% complete

Complete Rust runtime rewrite: Full compiler with Type Checker, WASM Codegen, and CI/CD Pipelines - 100% complete #22

Workflow file for this run

name: Deploy VitePress Documentation to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: false
on:
push:
branches: [main]
paths:
- "hypnoscript-docs/**"
- ".github/workflows/deploy-docs.yml"
- "hypnoscript-*/src/**"
- "README.md"
pull_request:
branches: [main]
paths:
- "hypnoscript-docs/**"
- "hypnoscript-*/src/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Für VitePress lastUpdated-Feature
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Build Rust documentation
run: |
cargo doc --no-deps --workspace --release
mkdir -p rust-docs
cp -r target/doc/* rust-docs/
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: hypnoscript-docs/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install Dependencies
working-directory: hypnoscript-docs
run: npm ci
- name: Build VitePress Documentation
working-directory: hypnoscript-docs
run: npm run build
- name: Copy Rust docs to build directory
run: |
mkdir -p hypnoscript-docs/docs/.vitepress/dist/rust-api
cp -r rust-docs/* hypnoscript-docs/docs/.vitepress/dist/rust-api/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: hypnoscript-docs/docs/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# Optional: Build and test on PR
test-build:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Build Rust documentation
run: cargo doc --no-deps --workspace --release
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: HypnoScript.Dokumentation/package-lock.json
- name: Install Dependencies
working-directory: HypnoScript.Dokumentation
run: npm ci
- name: Build VitePress Documentation
working-directory: HypnoScript.Dokumentation
run: npm run build
- name: Check for broken links
working-directory: HypnoScript.Dokumentation
run: |
npm install -g broken-link-checker
blc http://localhost:3000 -ro