Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hotfix] - docs workflow #6216

Merged
merged 6 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/branch-name-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ 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

- name: Check branch name for main PRs
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

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ on:
branches:
- main
- release/*
- "docs/*"
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- develop
- main
- "docs/*"

concurrency:
Expand Down Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading