Skip to content

Commit

Permalink
CI: Run publish-page workflow only on non-forks and docs changes (#1096)
Browse files Browse the repository at this point in the history
* CI: Run publish-page workflow only on non-forks and docs changes

Resolves #1054

* Proper fork detection

Co-authored-by: Iain Lane <[email protected]>

---------

Co-authored-by: Iain Lane <[email protected]>
  • Loading branch information
zerok and iainlane authored Jul 3, 2024
1 parent 0c5c8b3 commit d53a64e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/publish-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/publish-page.yml"
pull_request:
types:
- opened
- reopened
- synchronize
- closed
paths:
- "docs/**"
- ".github/workflows/publish-page.yml"

permissions:
contents: write
Expand All @@ -20,6 +26,9 @@ concurrency: ci-${{ github.ref }}

jobs:
publish:
# Do not run this on forks:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'grafana/tanka'

runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand Down

0 comments on commit d53a64e

Please sign in to comment.