-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
47 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 |
---|---|---|
@@ -1,53 +1,37 @@ | ||
name: Sync README to nextui-org/nextui | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'README.md' | ||
|
||
jobs: | ||
sync-readme: | ||
createPullRequest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
check-latest: true | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name "winchesHe" | ||
git config --global user.email "329487092@qq.com" | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Clone target repository | ||
run: | | ||
git clone https://github.com/nextui-org/nextui.git | ||
- name: Run Sync docs | ||
run: | | ||
pnpm sync:docs | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Commit and push changes | ||
run: | | ||
cd nextui | ||
git add . | ||
git commit -m "docs: sync README.md from nextui-cli" | ||
git push | ||
- name: Make changes to pull request | ||
run: date +%s > report.txt | ||
|
||
- name: Create a pull request | ||
uses: peter-evans/create-pull-request@v4 | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
commit-message: docs: sync README.md from nextui-cli | ||
branch: sync-readme | ||
title: "docs: sync README.md from nextui-cli" | ||
body: This PR was automatically created by GitHub Actions to sync README.md. | ||
token: ${{ secrets.PAT }} | ||
commit-message: Update report | ||
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | ||
signoff: false | ||
branch: example-patches | ||
delete-branch: true | ||
title: '[Example] Update report' | ||
body: | | ||
Update report | ||
- Updated with *today's* date | ||
- Auto-generated by [create-pull-request][1] | ||
[1]: https://github.com/peter-evans/create-pull-request | ||
labels: | | ||
report | ||
automated pr | ||
assignees: peter-evans | ||
reviewers: peter-evans | ||
team-reviewers: | | ||
developers | ||
qa-team | ||
milestone: 1 | ||
draft: false |