diff options
author | Luqman <luqazino@gmail.com> | 2024-03-14 15:23:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 15:23:46 +0100 |
commit | 14997af998c6f621034092b4655f5186933fd1bf (patch) | |
tree | 442e587d92bcc0843aed73f29d7b272041cd8426 | |
parent | 125bd56d5eea1d47d6447e2d9846c2a9d3a55444 (diff) | |
parent | 4e772211ee1918552bdff88cb2a380a48dfa8e2e (diff) |
Merge pull request #6210 from OpenBB-finance/hotfix/docs_workflow
Hotfix/docs workflow
-rw-r--r-- | .github/workflows/branch-name-check.yml | 4 | ||||
-rw-r--r-- | .github/workflows/gh-pages.yml | 5 | ||||
-rw-r--r-- | CONTRIBUTING.md | 3 |
3 files changed, 8 insertions, 4 deletions
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 |