2021-04-11 01:09:09 +03:00
|
|
|
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2020-07-03 22:13:39 +03:00
|
|
|
name: update-docs
|
|
|
|
|
|
|
|
on:
|
2020-07-21 20:35:43 +03:00
|
|
|
workflow_dispatch:
|
2020-07-28 04:48:28 +03:00
|
|
|
inputs:
|
|
|
|
gitName:
|
2021-04-19 20:53:38 +03:00
|
|
|
description: "git name for PR"
|
2020-07-28 04:48:28 +03:00
|
|
|
required: false
|
2021-04-19 20:53:38 +03:00
|
|
|
default: "tauri-bot"
|
2020-07-28 04:48:28 +03:00
|
|
|
gitEmail:
|
2021-04-19 20:53:38 +03:00
|
|
|
description: "git email for PR"
|
2020-07-28 04:48:28 +03:00
|
|
|
required: false
|
2021-04-19 20:53:38 +03:00
|
|
|
default: "tauri-bot@tauri.studio"
|
2020-07-03 22:13:39 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout tauri
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: tauri
|
|
|
|
- name: checkout tauri-docs
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: tauri-apps/tauri-docs
|
|
|
|
path: tauri-docs
|
|
|
|
- name: install webkit2gtk
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y webkit2gtk-4.0
|
|
|
|
- name: generate rust docs
|
2021-04-15 02:10:49 +03:00
|
|
|
working-directory: ./tauri/core/tauri
|
2020-07-03 22:13:39 +03:00
|
|
|
run: cargo doc --no-deps
|
|
|
|
- name: run rustdocusaurus
|
2021-04-19 20:53:38 +03:00
|
|
|
uses: tauri-apps/typedocusaurus@v1
|
2020-07-03 22:13:39 +03:00
|
|
|
with:
|
|
|
|
originPath: ./tauri/target/doc/
|
2020-07-30 00:53:30 +03:00
|
|
|
targetPath: ./tauri-docs/docs/en/api/rust/
|
2020-07-03 22:13:39 +03:00
|
|
|
sidebarPath: ./tauri-docs/sidebars.json
|
|
|
|
linksRoot: /docs/api/rust/
|
2021-04-21 19:20:12 +03:00
|
|
|
cratesToProcess: "tauri"
|
2021-04-11 21:00:24 +03:00
|
|
|
- name: run typedocusaurus
|
|
|
|
uses: tauri-apps/typedocusaurus/github-action@v1
|
|
|
|
with:
|
2021-04-12 07:59:25 +03:00
|
|
|
originPath: ./tauri/tooling/api/
|
2021-04-11 21:00:24 +03:00
|
|
|
sidebarFile: sidebars.json
|
|
|
|
targetPath: en/api/js
|
|
|
|
docusaurusPath: ./tauri-docs/
|
2020-07-03 22:13:39 +03:00
|
|
|
- name: git config
|
|
|
|
run: |
|
2020-07-28 04:48:28 +03:00
|
|
|
git config --global user.name "${{ github.event.inputs.gitName }}"
|
|
|
|
git config --global user.email "${{ github.event.inputs.gitEmail }}"
|
2020-07-03 22:13:39 +03:00
|
|
|
- name: create pull request for updated docs
|
2020-11-10 09:53:57 +03:00
|
|
|
uses: tauri-apps/create-pull-request@v3.4.1
|
2020-07-03 22:13:39 +03:00
|
|
|
with:
|
2020-07-06 01:09:46 +03:00
|
|
|
token: ${{ secrets.TAURI_BOT_PAT }}
|
2021-04-11 21:00:24 +03:00
|
|
|
commit-message: "chore(docs): Update Rust & TS docs"
|
2020-07-03 22:13:39 +03:00
|
|
|
branch: docs/release
|
2020-07-03 23:00:12 +03:00
|
|
|
path: tauri-docs
|
2020-07-03 22:13:39 +03:00
|
|
|
title: Update Docs
|
|
|
|
labels: "new release"
|
|
|
|
body: |
|
|
|
|
These are the updated docs from the most recent release.
|