Skip to content

Commit e9e63b6

Browse files
modified the script run build
1 parent f2db0c9 commit e9e63b6

File tree

7 files changed

+33
-28
lines changed

7 files changed

+33
-28
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Check if www folder exists
4040
run: |
4141
ls -la www
42-
42+
4343
- name: Check if there are changes
4444
run: |
4545
git diff --exit-code || echo "There are changes to commit"
@@ -51,7 +51,12 @@ jobs:
5151
git config --global user.name "sanjeetkumaritoutlook"
5252
git config --global user.email "sanjeetkumarit@outlook.com"
5353
git remote set-url origin https://github.com/sanjeetkumaritoutlook/sanjeetkumaritoutlook.github.io.git
54-
git add .
55-
git commit -m "Deploy to GitHub Pages"
56-
git push origin `git subtree split --prefix www main`:gh-pages --force
54+
# Check for changes
55+
if [ -n "$(git status --porcelain)" ]; then
56+
git add .
57+
git commit -m "Deploy to GitHub Pages"
58+
git push origin `git subtree split --prefix www main`:gh-pages --force
59+
else
60+
echo "No changes to commit, skipping deployment"
61+
fi
5762

src/components.d.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
*/
77
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
88
export namespace Components {
9-
interface AppHeader {
10-
}
119
interface AppHomePage {
1210
}
1311
interface AppProfilePage {
@@ -17,16 +15,12 @@ export namespace Components {
1715
}
1816
interface HeaderNavigation {
1917
}
18+
interface PostsDashboard {
19+
}
2020
interface WebComponents {
2121
}
2222
}
2323
declare global {
24-
interface HTMLAppHeaderElement extends Components.AppHeader, HTMLStencilElement {
25-
}
26-
var HTMLAppHeaderElement: {
27-
prototype: HTMLAppHeaderElement;
28-
new (): HTMLAppHeaderElement;
29-
};
3024
interface HTMLAppHomePageElement extends Components.AppHomePage, HTMLStencilElement {
3125
}
3226
var HTMLAppHomePageElement: {
@@ -51,24 +45,28 @@ declare global {
5145
prototype: HTMLHeaderNavigationElement;
5246
new (): HTMLHeaderNavigationElement;
5347
};
48+
interface HTMLPostsDashboardElement extends Components.PostsDashboard, HTMLStencilElement {
49+
}
50+
var HTMLPostsDashboardElement: {
51+
prototype: HTMLPostsDashboardElement;
52+
new (): HTMLPostsDashboardElement;
53+
};
5454
interface HTMLWebComponentsElement extends Components.WebComponents, HTMLStencilElement {
5555
}
5656
var HTMLWebComponentsElement: {
5757
prototype: HTMLWebComponentsElement;
5858
new (): HTMLWebComponentsElement;
5959
};
6060
interface HTMLElementTagNameMap {
61-
"app-header": HTMLAppHeaderElement;
6261
"app-home-page": HTMLAppHomePageElement;
6362
"app-profile-page": HTMLAppProfilePageElement;
6463
"app-root": HTMLAppRootElement;
6564
"header-navigation": HTMLHeaderNavigationElement;
65+
"posts-dashboard": HTMLPostsDashboardElement;
6666
"web-components": HTMLWebComponentsElement;
6767
}
6868
}
6969
declare namespace LocalJSX {
70-
interface AppHeader {
71-
}
7270
interface AppHomePage {
7371
}
7472
interface AppProfilePage {
@@ -78,26 +76,28 @@ declare namespace LocalJSX {
7876
}
7977
interface HeaderNavigation {
8078
}
79+
interface PostsDashboard {
80+
}
8181
interface WebComponents {
8282
}
8383
interface IntrinsicElements {
84-
"app-header": AppHeader;
8584
"app-home-page": AppHomePage;
8685
"app-profile-page": AppProfilePage;
8786
"app-root": AppRoot;
8887
"header-navigation": HeaderNavigation;
88+
"posts-dashboard": PostsDashboard;
8989
"web-components": WebComponents;
9090
}
9191
}
9292
export { LocalJSX as JSX };
9393
declare module "@stencil/core" {
9494
export namespace JSX {
9595
interface IntrinsicElements {
96-
"app-header": LocalJSX.AppHeader & JSXBase.HTMLAttributes<HTMLAppHeaderElement>;
9796
"app-home-page": LocalJSX.AppHomePage & JSXBase.HTMLAttributes<HTMLAppHomePageElement>;
9897
"app-profile-page": LocalJSX.AppProfilePage & JSXBase.HTMLAttributes<HTMLAppProfilePageElement>;
9998
"app-root": LocalJSX.AppRoot & JSXBase.HTMLAttributes<HTMLAppRootElement>;
10099
"header-navigation": LocalJSX.HeaderNavigation & JSXBase.HTMLAttributes<HTMLHeaderNavigationElement>;
100+
"posts-dashboard": LocalJSX.PostsDashboard & JSXBase.HTMLAttributes<HTMLPostsDashboardElement>;
101101
"web-components": LocalJSX.WebComponents & JSXBase.HTMLAttributes<HTMLWebComponentsElement>;
102102
}
103103
}

src/components/app-root/app-root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class AppRoot {
2727
</Route>
2828

2929
<Route path={/^\/posts-dashboard/}>
30-
<app-header></app-header>
30+
<posts-dashboard></posts-dashboard>
3131
</Route>
3232

3333
<Route path={/^\/web-components/}>

src/components/app-header/app-header.tsx renamed to src/components/posts-dashboard/posts-dashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component,State, h } from '@stencil/core';
22

33
@Component({
4-
tag: 'app-header',
5-
styleUrl: 'app-header.css',
4+
tag: 'posts-dashboard',
5+
styleUrl: 'posts-dashboard.css',
66
shadow: true,
77
})
88
export class AppHeader {
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { newE2EPage } from '@stencil/core/testing';
22

3-
describe('app-header', () => {
3+
describe('posts-dashboard', () => {
44
it('renders', async () => {
55
const page = await newE2EPage();
6-
await page.setContent('<app-header></app-header>');
6+
await page.setContent('<posts-dashboard></posts-dashboard>');
77

8-
const element = await page.find('app-header');
8+
const element = await page.find('posts-dashboard');
99
expect(element).toHaveClass('hydrated');
1010
});
1111
});
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { newSpecPage } from '@stencil/core/testing';
2-
import { AppHeader } from '../app-header';
2+
import { AppHeader } from '../posts-dashboard';
33

4-
describe('app-header', () => {
4+
describe('posts-dashboard', () => {
55
it('renders', async () => {
66
const page = await newSpecPage({
77
components: [AppHeader],
8-
html: `<app-header></app-header>`,
8+
html: `<posts-dashboard></posts-dashboard>`,
99
});
1010
expect(page.root).toEqualHtml(`
11-
<app-header>
11+
<posts-dashboard>
1212
<mock:shadow-root>
1313
<slot></slot>
1414
</mock:shadow-root>
15-
</app-header>
15+
</posts-dashboard>
1616
`);
1717
});
1818
});

0 commit comments

Comments
 (0)