Skip to content

update-docs-modified #22

update-docs-modified

update-docs-modified #22

# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: update-docs-modified
on:
repository_dispatch:
types: [dispatch-test]
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:
# Set a variable to handle the branch
CURRENT_BRANCH: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tauriBranch || 'refs/remotes/origin/1.x' }}"
steps:
- run: echo "$CURRENT_BRANCH"
- name: Checkout tauri
uses: actions/checkout@v3
with:
repository: vasfvitor/tauri
# here sets the branch
# ref: 1.x
ref: ${{ github.env.CURRENT_BRANCH }}
# ref: ${{ github.event.client_payload.ref }}
path: tauri
# - name: Checkout tauri-docs
# uses: actions/checkout@v3
# with:
# repository: vasfvitor/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.