Skip to content

Commit b5868db

Browse files
dtopuzovstnikolova
authored andcommitted
chore: fix CD
1 parent 1217075 commit b5868db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+58
-40
lines changed

.github/workflows/cd.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
branches:
77
- master
88

9-
defaults:
10-
run:
11-
working-directory: ./examples
12-
139
env:
1410
NODE_OPTIONS: --max_old_space_size=6144
1511

@@ -32,29 +28,40 @@ jobs:
3228
export-secrets-to-environment: false
3329

3430
- name: Use NodeJS v14
35-
uses: actions/setup-node@v2
31+
uses: actions/setup-node@v4
3632
with:
37-
node-version: '14'
33+
node-version: "14"
3834

3935
- name: Check out repository
40-
uses: actions/checkout@v3
41-
42-
- name: Install modules
43-
run: npm ci
36+
uses: actions/checkout@v4
4437

4538
- name: Build
39+
working-directory: ./examples
4640
run: ./bin/build-gh-pages
4741
env:
4842
KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }}
4943

44+
- name: Use NodeJS v18
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: "18"
48+
49+
- name: Build Node18 Examples
50+
run: |
51+
chmod +x ./examples-standalone/bin/build-gh-pages
52+
./examples-standalone/bin/build-gh-pages
53+
env:
54+
KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }}
55+
56+
- name: Copy Node18 Dist
57+
run: |
58+
cp -rf ./examples-standalone/dist/* ./examples/dist
59+
ls -la ./examples/dist
60+
5061
- name: Deploy to GH Pages
5162
uses: peaceiris/actions-gh-pages@v3
5263
with:
5364
github_token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
5465
publish_dir: ./examples/dist
55-
user_name: 'kendo-bot'
56-
user_email: 'kendouiteam@progress.com'
57-
58-
- name: Cleanup
59-
run: git clean -xdf
60-
66+
user_name: "kendo-bot"
67+
user_email: "kendouiteam@progress.com"

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ jobs:
7171
npm ci
7272
npm run build
7373
74-
- name: Spreadsheet Event Budgeting app
75-
working-directory: ./examples-standalone/spreadsheet-event-budgeting
74+
- name: Spreadsheet App
75+
working-directory: ./examples-standalone/spreadsheet-app
7676
run: |
7777
npm ci
7878
npm run build
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
3+
# Builds example projects and deploys them to GH Pages
4+
STANDALONE_PROJECTS=(finance-portfolio grid-charts-integration coffee-warehouse grid-live-data spreadsheet-app)
5+
6+
set -e
7+
8+
# Standalone Projects
9+
rm -rf ./examples-standalone/dist
10+
mkdir -p ./examples-standalone/dist
11+
for PROJECT in "${STANDALONE_PROJECTS[@]}"
12+
do
13+
pushd ./examples-standalone/${PROJECT} > /dev/null
14+
15+
echo Building ${PROJECT}
16+
npm ci
17+
rm -rf dist
18+
npx ng build --configuration production --base-href
19+
20+
# Move content of browser folder one level up
21+
if [ -d "dist/${PROJECT}/browser" ]; then
22+
mv dist/${PROJECT}/3rdpartylicenses.txt dist/${PROJECT}/browser/3rdpartylicenses.txt
23+
mv dist/${PROJECT}/browser ../../examples-standalone/dist/${PROJECT}
24+
fi
25+
26+
popd > /dev/null
27+
done
28+

examples-standalone/grid-charts-integration/angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{
4141
"type": "initial",
4242
"maximumWarning": "500kb",
43-
"maximumError": "1mb"
43+
"maximumError": "4mb"
4444
},
4545
{
4646
"type": "anyComponentStyle",

examples/bin/build-gh-pages

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
11
#!/usr/bin/env bash
22

33
# Builds example projects and deploys them to GH Pages
4-
54
WORKSPACE_PROJECTS=(integration-pwa integration-pwa-material)
6-
STANDALONE_PROJECTS=(finance-portfolio grid-charts-integration coffee-warehouse grid-live-data spreadsheet-app)
7-
85
set -e
96

107
# Workspace Projects
11-
# npm ci
12-
# rm -rf dist
13-
14-
# for PROJECT in "${WORKSPACE_PROJECTS[@]}"
15-
# do
16-
# echo Building ${PROJECT}
17-
# node --max_old_space_size=6144 ./node_modules/.bin/ng build ${PROJECT} --prod --base-href
18-
# done
8+
npm ci
9+
rm -rf dist
1910

20-
# Standalone Projects
21-
for PROJECT in "${STANDALONE_PROJECTS[@]}"
11+
for PROJECT in "${WORKSPACE_PROJECTS[@]}"
2212
do
23-
pushd ../examples-standalone/${PROJECT} > /dev/null
24-
2513
echo Building ${PROJECT}
26-
npm ci
27-
rm -rf dist
28-
node --max_old_space_size=6144 ./node_modules/.bin/ng build --configuration production --base-href
29-
mv dist/${PROJECT} ../../examples/dist
30-
31-
popd > /dev/null
14+
node --max_old_space_size=6144 ./node_modules/.bin/ng build ${PROJECT} --prod --base-href
3215
done
3316

3417
# Copy static assets

0 commit comments

Comments
 (0)