Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 59 additions & 9 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Build docs
on:
push:
branches: [master]
paths: ['impit/**']
pull_request:
branches: [master]
workflow_dispatch:
permissions:
contents: read
pages: write
Expand All @@ -11,8 +13,8 @@ concurrency:
group: deploy
cancel-in-progress: false
jobs:
build:
name: Build
build-rust:
name: Build rustdoc
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -21,9 +23,6 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Configure cache
uses: Swatinem/rust-cache@v2
- name: Setup pages
id: pages
uses: actions/configure-pages@v5
- name: Clean docs folder
run: cargo clean --doc
- name: Build docs
Expand All @@ -33,17 +32,68 @@ jobs:
- name: Copy redirect
run: cp impit/docs/index.html target/doc/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-artifact@v4
with:
path: target/doc/
name: rustdoc

build-node:
name: Build typedoc
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Configure cache
uses: Swatinem/rust-cache@v2
- name: Use Node.js
uses: actions/setup-node@v5
with:
node-version: 24

- name: Enable Corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for Node.js
uses: actions/setup-node@v5
with:
node-version: 24
cache: yarn
cache-dependency-path: impit-node/yarn.lock

- name: Install dependencies
run: cd impit-node && yarn

- name: Build docs
run: cd impit-node && yarn docs

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: impit-node/docs/
name: typedoc

deploy:
name: Deploy
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
needs: [build-rust, build-node]
steps:
- name: Download typedoc artifact
uses: actions/download-artifact@v5
with:
name: typedoc
path: docs/
- name: Setup pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
with:
folder: docs
5 changes: 3 additions & 2 deletions impit-node/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ dist
.AppleDouble
.LSOverride

# Icon must end with two
# Icon must end with two
Icon


Expand Down Expand Up @@ -196,4 +196,5 @@ Cargo.lock

*.node

example.ts
example.ts
docs/
Loading
Loading