Skip to content

Commit

Permalink
(MAINT) Build docs on PR, Publish on push
Browse files Browse the repository at this point in the history
This change modifies the GHA for the docs site to build the
docs on a PR but only publish them on a push to `main`.

This way, future docs changes that break the build can be
caught before a merge.
  • Loading branch information
michaeltlombardi authored and dlvhdr committed May 5, 2023
1 parent 028452f commit e4a5849
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/hugo.yaml
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- main
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -78,6 +79,7 @@ jobs:

# Deployment job
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit e4a5849

Please sign in to comment.