Skip to content

Commit cff4443

Browse files
Hristo HristovHristo Hristov
authored andcommitted
fix(cli): add environment and restore push only to default branch
1 parent 8f88f97 commit cff4443

File tree

6 files changed

+36
-12
lines changed

6 files changed

+36
-12
lines changed

packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy GitHub Pages
22

33
on:
44
push:
5-
branches: [ '*' ]
5+
branches: [ $(yamlDefaultBranch) ]
66
pull_request:
7-
branches: [ '*' ]
7+
branches: [ $(yamlDefaultBranch) ]
88

99
jobs:
1010
build-and-deploy:
@@ -15,6 +15,10 @@ jobs:
1515
pages: write
1616
id-token: write
1717

18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
1822
strategy:
1923
matrix:
2024
node-version: [22.x]

packages/cli/templates/webcomponents/igc-ts/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy GitHub Pages
22

33
on:
44
push:
5-
branches: [ '*' ]
5+
branches: [ $(yamlDefaultBranch) ]
66
pull_request:
7-
branches: [ '*' ]
7+
branches: [ $(yamlDefaultBranch) ]
88

99
jobs:
1010
build-and-deploy:
@@ -15,6 +15,10 @@ jobs:
1515
pages: write
1616
id-token: write
1717

18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
1822
strategy:
1923
matrix:
2024
node-version: [22.x]

packages/igx-templates/igx-ts-legacy/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy GitHub Pages
22

33
on:
44
push:
5-
branches: [ '*' ]
5+
branches: [ <%=yamlDefaultBranch%> ]
66
pull_request:
7-
branches: [ '*' ]
7+
branches: [ <%=yamlDefaultBranch%> ]
88

99
jobs:
1010
build-and-deploy:
@@ -15,6 +15,10 @@ jobs:
1515
pages: write
1616
id-token: write
1717

18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
1822
strategy:
1923
matrix:
2024
node-version: [22.x]

packages/igx-templates/igx-ts-legacy/projects/_base_with_home/files/__dot__github/workflows/github-pages.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy GitHub Pages
22

33
on:
44
push:
5-
branches: [ '*' ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ '*' ]
7+
branches: [ main ]
88

99
jobs:
1010
build-and-deploy:
@@ -15,6 +15,10 @@ jobs:
1515
pages: write
1616
id-token: write
1717

18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
1822
strategy:
1923
matrix:
2024
node-version: [22.x]

packages/igx-templates/igx-ts/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy GitHub Pages
22

33
on:
44
push:
5-
branches: [ '*' ]
5+
branches: [ <%=yamlDefaultBranch%> ]
66
pull_request:
7-
branches: [ '*' ]
7+
branches: [ <%=yamlDefaultBranch%> ]
88

99
jobs:
1010
build-and-deploy:
@@ -15,6 +15,10 @@ jobs:
1515
pages: write
1616
id-token: write
1717

18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
1822
strategy:
1923
matrix:
2024
node-version: [22.x]

packages/igx-templates/igx-ts/projects/_base_with_home/files/__dot__github/workflows/github-pages.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy GitHub Pages
22

33
on:
44
push:
5-
branches: [ '*' ]
5+
branches: [ <%=yamlDefaultBranch%> ]
66
pull_request:
7-
branches: [ '*' ]
7+
branches: [ <%=yamlDefaultBranch%> ]
88

99
jobs:
1010
build-and-deploy:
@@ -15,6 +15,10 @@ jobs:
1515
pages: write
1616
id-token: write
1717

18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
1822
strategy:
1923
matrix:
2024
node-version: [22.x]

0 commit comments

Comments
 (0)