Skip to content

Commit c75d9c7

Browse files
authored
feat: Add pages deployment variable logic and fixes in github pages yaml files (#1337)
1 parent 412a2a5 commit c75d9c7

File tree

16 files changed

+51
-29
lines changed

16 files changed

+51
-29
lines changed

packages/cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "igniteui-cli",
3-
"version": "14.2.3",
3+
"version": "14.2.4-beta.0",
44
"description": "CLI tool for creating Ignite UI projects",
55
"keywords": [
66
"CLI",
@@ -78,8 +78,8 @@
7878
"all": true
7979
},
8080
"dependencies": {
81-
"@igniteui/angular-templates": "~18.2.1423",
82-
"@igniteui/cli-core": "~14.2.3",
81+
"@igniteui/angular-templates": "~18.2.1424-beta.0",
82+
"@igniteui/cli-core": "~14.2.4-beta.0",
8383
"@inquirer/prompts": "^5.4.0",
8484
"@types/yargs": "^17.0.33",
8585
"chalk": "^5.3.0",

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
# Deactivate the workflow. Will be changed when AB is ready
12-
if: false
11+
if: $(yamlGenerateDeploymentScript) == true
1312
runs-on: ubuntu-latest
1413

1514
permissions:
1615
pages: write
1716
id-token: write
1817

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

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

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

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
# Deactivate the workflow. Will be changed when AB is ready
12-
if: false
11+
if: $(yamlGenerateDeploymentScript) == true
1312
runs-on: ubuntu-latest
1413

1514
permissions:
1615
pages: write
1716
id-token: write
1817

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

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

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

4344
return config;

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@igniteui/cli-core",
3-
"version": "14.2.3",
3+
"version": "14.2.4-beta.0",
44
"description": "Base types and functionality for Ignite UI CLI",
55
"repository": {
66
"type": "git",

packages/core/update/Update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function updatePackageJsonFiles(
198198
function updateWorkflows(
199199
fs: IFileSystem
200200
): void {
201-
const workflowFiles = ["node.js.yml", "github.io.yml"];
201+
const workflowFiles = ["node.js.yml", "github-pages.yml"];
202202
const oldNpmInstall = "- run: npm i # replace with 'npm ci' after committing lock file from first install";
203203
const newNpmInstall =
204204
`- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
# Deactivate the workflow. Will be changed when AB is ready
12-
if: false
11+
if: <%=yamlGenerateDeploymentScript%> == true
1312
runs-on: ubuntu-latest
1413

1514
permissions:
1615
pages: write
1716
id-token: write
1817

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

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ $app-palette: palette($primary, $secondary, $surface);
6666
path: name,
6767
projectTemplate: this.id,
6868
yamlDefaultBranch: "<%=yaml-default-branch%>", // the placeholder will be evaluated by CodeGen
69-
ApplicationTitle: "<%=ApplicationTitle%>" // the placeholder will be evaluated by CodeGen
69+
ApplicationTitle: "<%=ApplicationTitle%>", // the placeholder will be evaluated by CodeGen
70+
yamlGenerateDeploymentScript: "<%=yaml-generate-deployment-script%>" // the placeholder will be evaluated by CodeGen
7071
};
7172

7273
switch (theme) {

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ on:
88

99
jobs:
1010
build-and-deploy:
11-
# Deactivate the workflow. Will be changed when AB is ready
12-
if: false
11+
if: <%=yamlGenerateDeploymentScript%> == true
1312
runs-on: ubuntu-latest
1413

1514
permissions:
1615
pages: write
1716
id-token: write
1817

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

0 commit comments

Comments
 (0)