-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4952 from material-components:auto-pr-docs-action
PiperOrigin-RevId: 566852780
- Loading branch information
Showing
4 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Update API Docs | ||
|
||
on: | ||
push: | ||
branches: main | ||
workflow_dispatch: | ||
# allows triggering from the gihub 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 <[email protected]> | ||
committer: lit-robot <[email protected]> | ||
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters