Skip to content

Commit

Permalink
Fixes hub github actions to run on PRs
Browse files Browse the repository at this point in the history
We want to build the site for any contrib changes. But we
only want to deploy once merged to main. This adds
that conditional logic.
  • Loading branch information
skrawcz committed Sep 29, 2023
1 parent 25f9503 commit a7b49e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docusaurus-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: Deploy Docusaurus with GitHub Pages dependencies preinstalled
on:
# Runs on pushes targeting the default branch & contrib subdirectory
push:
branches: ["user_contrib", "main"]
paths:
- 'contrib/**'

Expand All @@ -25,7 +24,7 @@ concurrency:

jobs:
branch-build:
if: GITHUB_REF_NAME != 'main'
if: ${{ github.ref != 'refs/heads/main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down Expand Up @@ -64,7 +63,7 @@ jobs:
run: yarn build
# 👆 Build steps
deploy:
if: GITHUB_REF_NAME == 'main'
if: ${{ github.ref == 'refs/heads/main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit a7b49e8

Please sign in to comment.