Skip to content

Commit 766c896

Browse files
janbrasnasimoncozens
authored andcommitted
Deploy from additional default branches
1 parent 8aa2ad1 commit 766c896

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches:
88
- main
9+
- master # for backwards compatibility; use your default branch if different
910
tags:
1011
- '*'
1112

@@ -65,7 +66,7 @@ jobs:
6566
- name: Set up test result site
6667
run: cp scripts/index.html out/index.html
6768
- name: Collect deployment assets
68-
if: ${{ github.ref == 'refs/heads/main' }}
69+
if: ${{ github.ref_name == github.event.repository.default_branch }}
6970
uses: actions/upload-pages-artifact@v4
7071
with:
7172
path: ./out
@@ -81,7 +82,7 @@ jobs:
8182

8283
deploy:
8384
name: Deploy results to GitHub Pages
84-
if: ${{ github.ref == 'refs/heads/main' }}
85+
if: ${{ github.ref_name == github.event.repository.default_branch }}
8586
needs: build
8687
runs-on: ubuntu-latest
8788
permissions:
@@ -103,7 +104,7 @@ jobs:
103104

104105
release:
105106
name: Release bundle
106-
if: contains(github.ref, 'refs/tags/')
107+
if: ${{ github.ref_type == 'tag' }}
107108
needs: build
108109
runs-on: ubuntu-latest
109110
env:

0 commit comments

Comments
 (0)