Skip to content

MAINT/DOC setup documentation workflow #1

MAINT/DOC setup documentation workflow

MAINT/DOC setup documentation workflow #1

Workflow file for this run

name: Deploy docs to GitHub Pages
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latestt
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: ./src-tauri -> target
- name: Build Rust docs
run: |
cd src-tauri
cargo doc --no-deps
- name: Node setup and cache
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- name: Install doc dependencies
run: |
npm install
cd website
npm install
- name: Build docs
run: |
cd website
npm run build
- name: Copy Rust docs to build directory
run: cp -r src-tauri/target/doc website/build/rustdoc
- name: Upload build artifact
id: artifact-upload
uses: actions/upload-pages-artifact@v3
with:
path: website/build
- name: Output artifact URL
run: echo 'Artifact URL is ${{ steps.artifact-upload.outputs.artifact-url }}'