Skip to content

Commit

Permalink
Ensure action build only runs on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jinningwang committed Dec 1, 2024
1 parent 89e76b7 commit 9f92c88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ concurrency:

jobs:
build:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -66,6 +67,7 @@ jobs:
uses: actions/upload-pages-artifact@v3

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

0 comments on commit 9f92c88

Please sign in to comment.