Skip to content

Commit 1212675

Browse files
Hristo HristovHristo Hristov
authored andcommitted
fix(cli): remove generate deployment script property and add pages deployment repository variable in the script
1 parent 3748069 commit 1212675

File tree

10 files changed

+8
-12
lines changed

10 files changed

+8
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
if: $(yamlGenerateDeploymentScript) == true
11+
if: ${{ vars.PAGES_DEPLOYMENT == 'Always' || (vars.PAGES_DEPLOYMENT == 'Default' && github.ref_name == github.event.repository.default_branch) }}
1212
runs-on: ubuntu-latest
1313

1414
permissions:

packages/cli/templates/react/igr-ts/projects/_base/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ export class BaseIgrTsProject implements ProjectTemplate {
4242
"dot": ".",
4343
"path": name,
4444
"projectTemplate": this.id,
45-
"yamlDefaultBranch": this.id === "base" ? "<%=yaml-default-branch%>" : "main",
46-
"yamlGenerateDeploymentScript": "<%=yaml-generate-deployment-script%>"
45+
"yamlDefaultBranch": this.id === "base" ? "<%=yaml-default-branch%>" : "main"
4746
};
4847
}
4948
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
if: $(yamlGenerateDeploymentScript) == true
11+
if: ${{ vars.PAGES_DEPLOYMENT == 'Always' || (vars.PAGES_DEPLOYMENT == 'Default' && github.ref_name == github.event.repository.default_branch) }}
1212
runs-on: ubuntu-latest
1313

1414
permissions:

packages/cli/templates/webcomponents/igc-ts/projects/_base/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ export class BaseIgcProject implements ProjectTemplate {
3737
dot: ".",
3838
path: name,
3939
projectTemplate: this.id,
40-
yamlDefaultBranch: this.id === "base" ? "<%=yaml-default-branch%>" : "main",
41-
yamlGenerateDeploymentScript: "<%=yaml-generate-deployment-script%>"
40+
yamlDefaultBranch: this.id === "base" ? "<%=yaml-default-branch%>" : "main"
4241
};
4342

4443
return config;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
if: <%=yamlGenerateDeploymentScript%> == true
11+
if: ${{ vars.PAGES_DEPLOYMENT == 'Always' || (vars.PAGES_DEPLOYMENT == 'Default' && github.ref_name == github.event.repository.default_branch) }}
1212
runs-on: ubuntu-latest
1313

1414
permissions:

packages/igx-templates/igx-ts-legacy/projects/_base/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ $app-palette: palette($primary, $secondary, $surface);
6767
projectTemplate: this.id,
6868
yamlDefaultBranch: "<%=yaml-default-branch%>", // the placeholder will be evaluated by CodeGen
6969
ApplicationTitle: "<%=ApplicationTitle%>", // the placeholder will be evaluated by CodeGen
70-
yamlGenerateDeploymentScript: "<%=yaml-generate-deployment-script%>" // the placeholder will be evaluated by CodeGen
7170
};
7271

7372
switch (theme) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
if: <%=yamlGenerateDeploymentScript%> == true
11+
if: ${{ vars.PAGES_DEPLOYMENT == 'Always' || (vars.PAGES_DEPLOYMENT == 'Default' && github.ref_name == github.event.repository.default_branch) }}
1212
runs-on: ubuntu-latest
1313

1414
permissions:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
if: <%=yamlGenerateDeploymentScript%> == true
11+
if: ${{ vars.PAGES_DEPLOYMENT == 'Always' || (vars.PAGES_DEPLOYMENT == 'Default' && github.ref_name == github.event.repository.default_branch) }}
1212
runs-on: ubuntu-latest
1313

1414
permissions:

packages/igx-templates/igx-ts/projects/_base/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ $app-palette: palette($primary, $secondary, $surface);
6868
igxPackage: NPM_ANGULAR,
6969
yamlDefaultBranch: "<%=yaml-default-branch%>", // the placeholder will be evaluated by CodeGen
7070
ApplicationTitle: "<%=ApplicationTitle%>", // the placeholder will be evaluated by CodeGen
71-
yamlGenerateDeploymentScript: "<%=yaml-generate-deployment-script%>" // the placeholder will be evaluated by CodeGen
7271
};
7372

7473
switch (theme) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
if: <%=yamlGenerateDeploymentScript%> == true
11+
if: ${{ vars.PAGES_DEPLOYMENT == 'Always' || (vars.PAGES_DEPLOYMENT == 'Default' && github.ref_name == github.event.repository.default_branch) }}
1212
runs-on: ubuntu-latest
1313

1414
permissions:

0 commit comments

Comments
 (0)