-
Notifications
You must be signed in to change notification settings - Fork 904
44 lines (38 loc) · 1.26 KB
/
update-docs-on-main.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
44
name: Update API Docs
on:
push:
branches: main
workflow_dispatch:
# allows triggering from the github UI
jobs:
check-for-doc-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- uses: google/wireit@setup-github-actions-caching/v1
- name: Install Dependencies
run: npm ci
- name: Update Docs
run: npm run update-docs
- name: Check if update-docs produces git diff
id: ifChange
run: git diff --exit-code || echo "::set-output name=changed::yes"
- name: Create PR
if: steps.ifChange.outputs.changed == 'yes'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.LIT_ROBOT_ACCESS_TOKEN }}
commit-message: 'docs: update API docs'
author: lit-robot <lit-robot@google.com>
committer: lit-robot <lit-robot@google.com>
title: 'docs: update API docs'
body: This PR was auto generated by the update-docs-on-main GitHub action.
reviewers: e111077,asyncliz,AndrewJakubowicz
branch: auto-update-docs
labels: |
Ready for Google
preview-catalog