mirror of
https://github.com/tauri-apps/rustdocusaurus.git
synced 2026-02-04 10:41:19 +01:00
rustdocusaurus github action
This will let you run this script as a Github Action. The following are the required options.
- name: run rustdocusaurus
uses: tauri-apps/rustdocusaurus/github-action@master
with:
originPath: ./tauri/target/docs/
targetPath: ./tauri-docs/docs/api/rust/
sidebarPath: ./tauri-docs/sidebars.json
linksRoot: /docs/api/rust/
cratesToProcess: "tauri,tauri_api,tauri_utils"
originPathis the folder containing rustdoc generated files, "/path/to/tauri/target/doc/"targetPaththe "rust" directory in tauri-docs, it contains the resulting MDX, "path/to/tauri-docs/docs/api/rust/"sidebarPaththe sidebars.json file we want to read/write, it lives at the root of tauri-docs, "/path/to/tauri-docs/sidebars.json"linksRootcan remain as is for now: "/docs/api/rust/", it's the root URI used for creating the HTML linkscratesToProcessa list of crates to process; after cargo doc, you have folders in the tauri/target/doc directory: these are the resulting docs for each crate. This is a comma separated list.
updating
This code is prebuilt using ncc. After you make a code change, run yarn build to run the script to update the dist directory.