tauri/.github/workflows/update-docs.yml
Jacob Bolda ea8adcfb06
chore: bump create-pr-action to resolve deprecation (#1077)
The set-env function in Github Actions has been deprecated which the previous version used. This update resolves the issue.
2020-11-10 00:53:57 -06:00

58 lines
1.7 KiB
YAML

name: update-docs
on:
workflow_dispatch:
inputs:
gitName:
description: 'git name for PR'
required: false
default: 'tauri-bot'
gitEmail:
description: 'git email for PR'
required: false
default: 'tauri-bot@tauri.studio'
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@v1
with:
originPath: ./tauri/target/doc/
targetPath: ./tauri-docs/docs/en/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.inputs.gitName }}"
git config --global user.email "${{ github.event.inputs.gitEmail }}"
- name: create pull request for updated docs
uses: tauri-apps/create-pull-request@v3.4.1
with:
token: ${{ secrets.TAURI_BOT_PAT }}
commit-message: "chore(docs): Update Rust docs"
branch: docs/release
path: tauri-docs
title: Update Docs
labels: "new release"
body: |
These are the updated docs from the most recent release.