fix: restrict github pages publication to published releases (#304)

We currently publish an update when we merge to `main`. This means new functionality that is not yet released is being talked about on the docs site.

This restricts deploying to github pages to only published releases.

Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
Brian McGee 2024-05-29 08:23:34 +01:00 committed by GitHub
parent 06f15f4237
commit ff957c5f1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,8 @@ on:
- main
pull_request:
workflow_dispatch:
release:
types: [released]
permissions:
contents: write
@ -41,7 +43,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
name: deploy
if: github.ref == 'refs/heads/main'
if: github.event_name == 'release' && github.event._action == 'released'
steps:
- name: Deploy to GitHub Pages
id: deployment