From d9aa0e7663dd243b8121146b7f3b45447506fb5a Mon Sep 17 00:00:00 2001 From: winches <329487092@qq.com> Date: Sun, 19 May 2024 23:55:07 +0800 Subject: [PATCH] docs: test --- .github/workflows/sync.yml | 67 ++++++++++++++++++++------------------ README.md | 2 ++ 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 410d68f..57f38d2 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -1,37 +1,42 @@ +name: Sync README to nextui-org/nextui + +on: + push: + paths: + - 'README.md' jobs: - createPullRequest: + sync-readme: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Make changes to pull request - run: date +%s > report.txt + - name: Checkout source repository + uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + check-latest: true + node-version-file: '.nvmrc' + - 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/winchesHe/nextui + - name: Run Sync docs + run: | + pnpm sync:docs + cp ./nextui ../ + - name: Commit and push changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + cd ../nextui + rm -rf nextui-cli + git config --global user.name "winchesHe" + git config --global user.email "329487092@qq.com" - name: Create Pull Request - id: cpr uses: peter-evans/create-pull-request@v6 - with: - 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 \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "docs: sync README.md from nextui-cli" + branch: main + title: "docs: sync README.md from nextui-cli" + body: This PR was automatically created by GitHub Actions to sync README.md. \ No newline at end of file diff --git a/README.md b/README.md index f74bc26..8eab8c5 100644 --- a/README.md +++ b/README.md @@ -461,3 +461,5 @@ Please adhere to this project's [CODE_OF_CONDUCT](https://github.com/nextui-org/ ## License [MIT](https://choosealicense.com/licenses/mit/) + +#