2020-07-03 22:13:39 +03:00
|
|
|
name: update-docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-07-06 01:09:46 +03:00
|
|
|
- latest
|
2020-07-03 22:13:39 +03:00
|
|
|
paths:
|
|
|
|
- '**/package.json'
|
|
|
|
- '.github/workflows/**'
|
|
|
|
|
|
|
|
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
|
|
|
|
working-directory: tauri
|
|
|
|
run: cargo doc --no-deps
|
|
|
|
- name: run rustdocusaurus
|
|
|
|
uses: tauri-apps/rustdocusaurus/github-action@master
|
|
|
|
with:
|
|
|
|
originPath: ./tauri/target/doc/
|
|
|
|
targetPath: ./tauri-docs/docs/api/rust/
|
|
|
|
sidebarPath: ./tauri-docs/sidebars.json
|
|
|
|
linksRoot: /docs/api/rust/
|
|
|
|
cratesToProcess: "tauri,tauri_api,tauri_utils"
|
|
|
|
- name: git config
|
|
|
|
run: |
|
|
|
|
git config --global user.name "${{ github.event.pusher.name }}"
|
|
|
|
git config --global user.email "${{ github.event.pusher.email }}"
|
|
|
|
- name: create pull request for updated docs
|
|
|
|
uses: tauri-apps/create-pull-request@v2.8.0
|
|
|
|
with:
|
2020-07-06 01:09:46 +03:00
|
|
|
token: ${{ secrets.TAURI_BOT_PAT }}
|
2020-07-03 22:13:39 +03:00
|
|
|
commit-message: "chore(docs): Update Rust docs"
|
|
|
|
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.
|