diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index b80fef7..0000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Codespell - -on: - push: - branches: [main] - pull_request: - branches: [main] - -permissions: - contents: read - -jobs: - codespell: - name: Check for spelling errors - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Codespell - uses: codespell-project/actions-codespell@v2 diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml index bfa4809..b3c97d0 100644 --- a/.github/workflows/versioning.yml +++ b/.github/workflows/versioning.yml @@ -32,19 +32,14 @@ jobs: - name: Run Docusaurus versioning run: npx docusaurus docs:version ${{ steps.extract_version.outputs.version }} - - name: Create branch and commit changes - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - BRANCH="version-${{ steps.extract_version.outputs.version }}" - git checkout -b $BRANCH - git add . - git commit -m "Add Docusaurus version ${{ steps.extract_version.outputs.version }}" || echo "No changes to commit" - git push origin $BRANCH - - - name: Create Pull Request - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - BRANCH="version-${{ steps.extract_version.outputs.version }}" - gh pr create --base main --head $BRANCH --title "Add version ${{ steps.extract_version.outputs.version }}" --body "Automated versioning changes for v${{ steps.extract_version.outputs.version }}. This includes English docs; Chinese will fallback to English as per Docusaurus behavior." + - name: Create Pull Request via API + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Add Docusaurus version ${{ steps.extract_version.outputs.version }}" + title: "Add version ${{ steps.extract_version.outputs.version }}" + body: "Automated versioning changes for v${{ steps.extract_version.outputs.version }}" + branch: "version-${{ steps.extract_version.outputs.version }}" + base: "main" + delete-branch: true + signoff: true