diff --git a/.github/workflows/branch-name-check.yml b/.github/workflows/branch-name-check.yml index 430e43f8d9b..880bf4768c0 100644 --- a/.github/workflows/branch-name-check.yml +++ b/.github/workflows/branch-name-check.yml @@ -31,7 +31,7 @@ jobs: id: check-develop-branch if: ${{ steps.branch-names.outputs.base_ref_branch == 'develop' }} run: | - if ! [[ "${{ steps.branch-names.outputs.head_ref_branch }}" =~ ^(feature/.*|docs/.*|bugfix/.*|release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?)$ ]]; then + if ! [[ "${{ steps.branch-names.outputs.head_ref_branch }}" =~ ^(feature/.*|docs/.*|bugfix/.*|hotfix/.*|release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?)$ ]]; then echo "reason=Invalid branch name for a Pull Request to be merged to `${{ steps.branch-names.outputs.base_ref_branch }}` branch. Branches must follow the GitFlow naming convention." >> $GITHUB_OUTPUT fi @@ -39,7 +39,7 @@ jobs: id: check-main-branch if: ${{ steps.branch-names.outputs.base_ref_branch == 'main' }} run: | - if ! [[ "${{ steps.branch-names.outputs.head_ref_branch }}" =~ ^(hotfix/.*|release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?)$ ]]; then + if ! [[ "${{ steps.branch-names.outputs.head_ref_branch }}" =~ ^(hotfix/.*|docs/.*|release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?)$ ]]; then echo "reason=Invalid branch name for a Pull Request to be merged to `${{ steps.branch-names.outputs.base_ref_branch }}` branch. Pull requests must be from a hotfix or release branch." >> $GITHUB_OUTPUT fi diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 6798a1df4c2..0ebe358c4ca 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -5,10 +5,11 @@ on: branches: - main - release/* + - "docs/*" pull_request: types: [opened, synchronize, reopened, closed] branches: - - develop + - main - "docs/*" concurrency: @@ -102,7 +103,7 @@ jobs: (startsWith(github.ref, 'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && - github.event.pull_request.base.ref == 'develop' && + github.event.pull_request.base.ref == 'main' && startsWith(github.head_ref, 'docs/')) with: github_token: ${{ secrets.DEPLOY_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd290578b6e..ce7d7cab9f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1703,9 +1703,12 @@ The accepted branch naming conventions are: - `hotfix/hotfix-name` - `release/2.1.0` or `release/2.1.0rc0`. - `bugfix/bugfix-name` +- `docs/docs-name` All `feature/feature-name` related branches can only have PRs pointing to `develop` branch. `hotfix/hotfix-name` and `release/*` branches can only have PRs pointing to `main` branch. +The `docs/docs-name` branch is used to update documentation in-between releases, it will trigger the website deployment to GitHub pages. + ## Installers When implementing a new feature or fixing something within the codebase, it is necessary to ensure that it is working