Skip to content

Commit bc04366

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

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 9 additions & 2 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
@@ -98,7 +105,7 @@ jobs:
98105
runs-on: ubuntu-latest
99106
# Skip if this is a branch creation event (before SHA is all zeros)
100107
if: >-
101-
(startsWith(github.ref, 'refs/heads/release/') && github.event.before != '0000000000000000000000000000000000000000') ||
108+
startsWith(github.ref, 'refs/heads/release/') ||
102109
startsWith(github.event.pull_request.base.ref, 'release/')
103110
permissions:
104111
contents: read

0 commit comments

Comments
 (0)