Skip to content

Commit

Permalink
ci: narrow when docs are built and published
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
JP-Ellis committed Jun 5, 2024
1 parent c993702 commit 4b244f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: docs

on:
push:
tags:
- v*
branches:
- master
pull_request:
branches:
- master

env:
STABLE_PYTHON_VERSION: "3.12"
Expand Down Expand Up @@ -41,7 +48,7 @@ jobs:
publish:
name: Publish docs

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

needs: build
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4b244f9

Please sign in to comment.