Skip to content

Commit 021316d

Browse files
committed
ci: don't run docs build on release cut
1 parent 02120f5 commit 021316d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/docs.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ on:
2121
push:
2222
branches:
2323
- main
24-
- 'release/**'
24+
- "release/**"
2525
pull_request:
2626
branches:
2727
- main
28+
- "release/**"
2829
paths:
2930
- ".github/workflows/docs.yml"
3031
- "requirements-docs.txt"
@@ -37,6 +38,12 @@ on:
3738
jobs:
3839
lint:
3940
runs-on: ubuntu-latest
41+
# Don't run this workflow if this is a release branch creation event
42+
# (event.before SHA is all zeros)
43+
if: >-
44+
!(github.event_name == 'push' &&
45+
startsWith(github.ref, 'refs/heads/release/') &&
46+
github.event.before == '0000000000000000000000000000000000000000')
4047
steps:
4148
- name: Checkout Code
4249
uses: actions/checkout@v5
@@ -96,9 +103,8 @@ jobs:
96103
build_and_verify_release:
97104
needs: lint
98105
runs-on: ubuntu-latest
99-
# Skip if this is a branch creation event (before SHA is all zeros)
100106
if: >-
101-
(startsWith(github.ref, 'refs/heads/release/') && github.event.before != '0000000000000000000000000000000000000000') ||
107+
startsWith(github.ref, 'refs/heads/release/') ||
102108
startsWith(github.event.pull_request.base.ref, 'release/')
103109
permissions:
104110
contents: read

0 commit comments

Comments
 (0)