Skip to content

Commit 44940dd

Browse files
authored
Merge pull request #2700 from telerik/deploy-astro-app
Deploy Astro app to github pages
2 parents 1fe0144 + d889a64 commit 44940dd

23 files changed

+1314
-1500
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,24 @@ updates:
3636
labels:
3737
- "Dependencies"
3838

39+
- package-ecosystem: "npm"
40+
directory: "/examples/kendo-react-e-commerce-astro-app"
41+
schedule:
42+
interval: "daily"
43+
groups:
44+
kendo-dependencies:
45+
patterns:
46+
- '@progress/kendo-*'
47+
allow:
48+
- dependency-name: '@progress/kendo-*'
49+
commit-message:
50+
prefix: "chore:"
51+
reviewers:
52+
- "telerik/kendo-react-devs"
53+
- "telerik/kendo-react-support"
54+
labels:
55+
- "Dependencies"
56+
3957
- package-ecosystem: "npm"
4058
directory: "/examples/kendo-react-build-a-sales-dashboard"
4159
schedule:

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
ecommerce-jewellery-store:
3333
- 'examples/ecommerce-jewellery-store/**'
3434
kendo-react-build-a-sales-dashboard:
35-
- 'examples/kendo-react-build-a-sales-dashboard/**'
35+
- 'examples/kendo-react-build-a-sales-dashboard/**'
36+
kendo-react-e-commerce-astro-app:
37+
- 'examples/kendo-react-e-commerce-astro-app/**'
3638
kendo-react-file-manager:
3739
- 'examples/kendo-react-file-manager/**'
3840
kendo-react-finance-portfolio:
@@ -72,6 +74,13 @@ jobs:
7274
npm ci
7375
npm run build
7476
77+
- name: Build Ecommerce Astro app
78+
working-directory: ./examples/kendo-react-e-commerce-astro-app
79+
if: steps.changes.outputs.kendo-react-e-commerce-astro-app == 'true'
80+
run: |
81+
npm ci
82+
npm run build
83+
7584
- name: Build A Sales Dashboard app
7685
working-directory: ./examples/kendo-react-build-a-sales-dashboard
7786
if: steps.changes.outputs.kendo-react-build-a-sales-dashboard == 'true'

examples/kendo-react-e-commerce-astro-app/astro.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ import react from '@astrojs/react';
33

44
export default defineConfig({
55
integrations: [react()],
6+
base: `/kendo-react/kendo-react-e-commerce-astro-app/`,
7+
build: {
8+
outDir: 'build'
9+
},
610
});

examples/kendo-react-e-commerce-astro-app/package-lock.json

Lines changed: 1199 additions & 1429 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/kendo-react-e-commerce-astro-app/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
"name": "kendo-react-e-commerce-astro-app",
33
"type": "module",
44
"version": "0.0.1",
5+
"homepage": "https://telerik.github.io/kendo-react/kendo-react-e-commerce-astro-app/",
56
"scripts": {
67
"dev": "astro dev",
78
"start": "astro dev",
89
"build": "astro check && astro build",
910
"preview": "astro preview",
10-
"astro": "astro"
11+
"astro": "astro",
12+
"predeploy": "npm run build",
13+
"deploy": "gh-pages -d build"
1114
},
1215
"dependencies": {
1316
"@astrojs/check": "^0.9.4",
@@ -37,7 +40,11 @@
3740
"@progress/kendo-theme-default": "^10.0.1",
3841
"@progress/kendo-theme-utils": "^10.0.1",
3942
"astro": "^4.16.6",
43+
"gh-pages": "^6.1.1",
4044
"nanostores": "^0.11.3",
4145
"typescript": "^5.6.3"
46+
},
47+
"overrides": {
48+
"prettier": "^3.0.0"
4249
}
4350
}

examples/kendo-react-e-commerce-astro-app/src/components/AllProductsListView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ export const AllProductsListView = () => {
3030

3131
const cards: CardDescriptor[] = [
3232
{
33-
img: "/necklace_1.jfif",
33+
img: "/kendo-react/kendo-react-e-commerce-astro-app/necklace_1.jfif",
3434
collectionText: 'Collection "SERENE"',
3535
},
3636
{
37-
img: "/ring_1.jfif",
37+
img: "/kendo-react/kendo-react-e-commerce-astro-app/ring_1.jfif",
3838
collectionText: 'Collection "AURELIA"',
3939
},
4040
{
41-
img: "/1111.jfif",
41+
img: "/kendo-react/kendo-react-e-commerce-astro-app/1111.jfif",
4242
collectionText: 'Collection "RAVINA"',
4343
},
4444
];
@@ -61,7 +61,7 @@ export const AllProductsListView = () => {
6161
title={title}
6262
subtitle={subtitle}
6363
contentText={contentText}
64-
img="/bracelets.png"
64+
img="/kendo-react/kendo-react-e-commerce-astro-app/bracelets.png"
6565
order={order}
6666
link={null}
6767
/>

examples/kendo-react-e-commerce-astro-app/src/components/BackgroundImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const BackgroundImage = (props: BackgroundImageProps) => {
55
const { img, title, subtitle, buttonText } = props;
66

77
const onButtonClick = () => {
8-
window.location.href="/products"
8+
window.location.href="/kendo-react/kendo-react-e-commerce-astro-app/products"
99
}
1010

1111
return (

examples/kendo-react-e-commerce-astro-app/src/components/CardsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CardListProps } from "../data/types";
66
export const CardsList = (props: CardListProps) => {
77

88
const onButtonClick = (index: number) => {
9-
window.location.href=`/product/${index + 1}`;
9+
window.location.href=`/kendo-react/kendo-react-e-commerce-astro-app/product/${index + 1}`;
1010
};
1111

1212
return (

examples/kendo-react-e-commerce-astro-app/src/components/Contacts.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Label } from '@progress/kendo-react-labels';
1919

2020
const Contacts: React.FC = () => {
2121
const onSubmitClick = () => {
22-
window.location.href = "/thankyou";
22+
window.location.href = "/kendo-react/kendo-react-e-commerce-astro-app/thankyou";
2323
};
2424

2525
return (
@@ -73,7 +73,7 @@ const Contacts: React.FC = () => {
7373
</div>
7474
<div className="k-col-span-5 k-col-start-8 k-d-flex k-flex-col k-align-items-start">
7575
<img
76-
src="/contactsImage.png"
76+
src="/kendo-react/kendo-react-e-commerce-astro-app/contactsImage.png"
7777
alt="Contacts"
7878
style={{
7979
maxWidth: '630px',

0 commit comments

Comments
 (0)