Skip to content

Merge pull request #181 from J-ZhengLi/dev-zhengli #11

Merge pull request #181 from J-ZhengLi/dev-zhengli

Merge pull request #181 from J-ZhengLi/dev-zhengli #11

Workflow file for this run

name: Generate Docs
on:
workflow_dispatch:
push:
branches: [ "master" ]
paths:
- '**.rs'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: deploy
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Config pages
id: pages
uses: actions/configure-pages@v5
- name: Build docs
run: cargo doc --no-deps --workspace --document-private-items
- name: Add redirect
run: echo '<meta http-equiv="refresh" content="0;url=rim/index.html">' > target/doc/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4