Skip to content

Commit 4b244f9

Browse files
committed
ci: narrow when docs are built and published
With this change: - Docs are built on pushes to `master`, PRs targetting `master`, and when new `v*` tags are pushed. - Docs are published only when new `v*` tags are pushed (in line with new releases). Signed-off-by: JP-Ellis <josh@jpellis.me>
1 parent c993702 commit 4b244f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/docs.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: docs
22

33
on:
44
push:
5+
tags:
6+
- v*
7+
branches:
8+
- master
9+
pull_request:
10+
branches:
11+
- master
512

613
env:
714
STABLE_PYTHON_VERSION: "3.12"
@@ -41,7 +48,7 @@ jobs:
4148
publish:
4249
name: Publish docs
4350

44-
if: github.ref == 'refs/heads/master'
51+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
4552

4653
needs: build
4754
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)