Skip to content

Commit 5614686

Browse files
committed
Make workflows agnostic to default branch name
1 parent 9a5a6a8 commit 5614686

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/gh-pages.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- master
7+
- mainnet
8+
- 'forks/**'
79
workflow_dispatch:
810
pull_request:
911

@@ -41,7 +43,7 @@ jobs:
4143
needs: build
4244
runs-on: ubuntu-latest
4345
name: "Deploy Documentation"
44-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
46+
if: ${{ github.event_name == 'push' && github.ref_name == github.event.repository.default_branch }}
4547

4648
permissions:
4749
pages: write

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- master
7+
- mainnet
8+
- 'forks/**'
79
workflow_dispatch:
810
pull_request:
911

0 commit comments

Comments
 (0)