mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
docs build on develop for branches with name docs/* (#4821)
This commit is contained in:
2
.github/workflows/branch-name-check.yml
vendored
2
.github/workflows/branch-name-check.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Check branch name for develop PRs
|
||||
if: ${{ steps.branch-name-check.outputs.target-branch == 'develop' }}
|
||||
run: |
|
||||
if [[ "${{ steps.branch-name-check.outputs.source-branch }}" =~ ^(main|feature/.*|hotfix/.*|release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?)$ ]]; then
|
||||
if [[ "${{ steps.branch-name-check.outputs.source-branch }}" =~ ^(main|feature/.*|docs/.*|hotfix/.*|release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?)$ ]]; then
|
||||
echo "Branch name is valid"
|
||||
else
|
||||
echo "Invalid branch name. Branches must follow the GitFlow naming convention to be allowed to merge into the develop branch."
|
||||
|
||||
19
.github/workflows/gh-pages.yml
vendored
19
.github/workflows/gh-pages.yml
vendored
@@ -5,10 +5,22 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
pull_request:
|
||||
types: [closed]
|
||||
branches:
|
||||
- develop
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
name: Generate and Deploy documentation
|
||||
if: >
|
||||
github.event_name == 'push' ||
|
||||
(github.event_name == 'pull_request' &&
|
||||
startsWith(github.head_ref, 'docs/'))
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Git checkout
|
||||
@@ -73,7 +85,12 @@ jobs:
|
||||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: startsWith(github.ref, 'refs/heads/main')
|
||||
if: >
|
||||
(startsWith(github.ref, 'refs/heads/main')) ||
|
||||
(github.event_name == 'pull_request' &&
|
||||
github.event.pull_request.merged == true &&
|
||||
github.event.pull_request.base.ref == 'develop' &&
|
||||
startsWith(github.head_ref, 'docs/'))
|
||||
with:
|
||||
github_token: ${{ secrets.DEPLOY_TOKEN }}
|
||||
publish_dir: ./website/build
|
||||
|
||||
Reference in New Issue
Block a user