-
Notifications
You must be signed in to change notification settings - Fork 547
43 lines (37 loc) · 1.16 KB
/
gen-docs-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Docusaurus add version
on:
release:
types: [published]
jobs:
gen-docs-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache node_modules
uses: actions/cache@v3
with:
path: docs/node_modules
key: node_modules-${{ hashFiles('**/yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
cache-dependency-path: docs/yarn.lock
- name: Install Dependencies
run: yarn install
working-directory: ./docs
- name: Generate docusaurus docs for ${{ github.ref_name }}
run: yarn run docusaurus docs:version ${{ github.ref_name }}
working-directory: ./docs
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: 'chore: docusaurus deploy version ${{ github.ref_name }}'
commit-message: 'chore(docs): deploy version ${{ github.ref_name }}'
body: ''
base: main
branch: chore/docs/new-version
add-paths: |
docs/