Skip to content

fix(deps): update docusaurus monorepo to v2.4.3 #3083

fix(deps): update docusaurus monorepo to v2.4.3

fix(deps): update docusaurus monorepo to v2.4.3 #3083

Workflow file for this run

# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: update-docs
on:
push:
branches:
- dev
pull_request:
repository_dispatch:
types: [update-docs, test-update-docs]
workflow_dispatch:
inputs:
gitName:
description: 'git name for PR'
required: false
default: 'tauri-bot'
gitEmail:
description: 'git email for PR'
required: false
default: '[email protected]'
tauriBranch:
description: 'tauri branch to pull'
required: false
jobs:
update-docs:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0 # This is set to 0 by the rust cache action, but better safe than sorry.
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
RUST_BACKTRACE: short
steps:
# Setup
- name: Checkout tauri
uses: actions/checkout@v3
with:
repository: tauri-apps/tauri
ref: ${{ github.event.inputs.tauriBranch }}
path: tauri
- name: Checkout tauri-docs
uses: actions/checkout@v3
with:
repository: tauri-apps/tauri-docs
path: tauri-docs
submodules: true
- name: Update submodules
working-directory: ./tauri-docs
run: git submodule update --remote
- name: Build typedoc-plugin-markdown
working-directory: ./tauri-docs/packages/typedoc-plugin-markdown
run: |
npm install
cd packages/typedoc-plugin-markdown/
yarn build
- name: Prep for JS doc generation
working-directory: ./tauri/tooling/api
run: yarn
- name: Cleanup JS Docs
run: rm -rf tauri-docs/docs/api/js/*
- name: Build JS docs
working-directory: ./tauri-docs/packages/js-doc-generator
run: yarn && yarn generate-docs
# Any Rust documentation is currently disabled while we're falling back to docs.rs
#- name: install webkit2gtk
# run: |
# sudo apt-get update
# sudo apt-get install -y webkit2gtk-4.0 libappindicator3-dev
# # Rust
# - name: generate rust docs
# working-directory: ./tauri/core/tauri
# run: cargo doc --no-deps
# - name: run rustdocusaurus
# uses: tauri-apps/rustdocusaurus/github-action@v1
# with:
# originPath: ./tauri/target/doc/
# targetPath: ./tauri-docs/docs/en/api/rust/
# sidebarPath: "${{ github.workspace }}/tauri-docs/sidebars/rustdoc.json"
# linksRoot: ""
# cratesToProcess: "tauri"
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-docs
- uses: Swatinem/rust-cache@v2
with:
workspaces: tauri/tooling/cli
- name: Build tauri-cli
run: cargo build --manifest-path ./tauri/tooling/cli/Cargo.toml
- name: Install dependencies
working-directory: ./tauri-docs
run: yarn
- name: Generate cli and config docs
run: |
node tauri-docs/.scripts/generate-cli-doc.js
node tauri-docs/.scripts/generate-config-doc.js
#- name: Generate tauri AST
# uses: actions-rs/cargo@v1
# with:
# command: doc
# args: --no-deps --manifest-path ./tauri/core/tauri/Cargo.toml --no-default-features --features "wry __isolation-docs custom-protocol api-all cli __updater-docs system-tray devtools dox"
# env:
# RUSTDOCFLAGS: '-Z unstable-options --output-format json'
#- name: Copy tauri.json
# run: cp tauri/target/doc/tauri.json tauri-docs/docs/api/rust/
# tauri-docs PR
- name: Git config
run: |
git config --global user.name "${{ github.event.inputs.gitName }}"
git config --global user.email "${{ github.event.inputs.gitEmail }}"
- name: Create pull request for updated docs
# soft fork of https://github.com/peter-evans/create-pull-request for security purposes
uses: tauri-apps/[email protected]
if: github.event_name != 'pull_request' && github.event_name != 'push'
with:
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
commit-message: 'chore(docs): Update Rust & TS docs'
branch: docs/release
path: tauri-docs
title: Update Docs
labels: 'new release'
body: |
These are the updated docs from the most recent release.