Skip to content

Commit 42286f6

Browse files
committed
chore: fix CD
1 parent 1217075 commit 42286f6

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

+74
-39
lines changed

.github/workflows/cd.yml

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ on:
55
push:
66
branches:
77
- master
8-
9-
defaults:
10-
run:
11-
working-directory: ./examples
8+
- fix-cd
129

1310
env:
1411
NODE_OPTIONS: --max_old_space_size=6144
1512

1613
jobs:
17-
build:
14+
general-examples:
1815
runs-on: ubuntu-latest
1916

2017
permissions:
@@ -32,17 +29,15 @@ jobs:
3229
export-secrets-to-environment: false
3330

3431
- name: Use NodeJS v14
35-
uses: actions/setup-node@v2
32+
uses: actions/setup-node@v4
3633
with:
37-
node-version: '14'
34+
node-version: "14"
3835

3936
- name: Check out repository
40-
uses: actions/checkout@v3
41-
42-
- name: Install modules
43-
run: npm ci
37+
uses: actions/checkout@v4
4438

4539
- name: Build
40+
working-directory: ./examples
4641
run: ./bin/build-gh-pages
4742
env:
4843
KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }}
@@ -52,9 +47,45 @@ jobs:
5247
with:
5348
github_token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
5449
publish_dir: ./examples/dist
55-
user_name: 'kendo-bot'
56-
user_email: 'kendouiteam@progress.com'
50+
user_name: "kendo-bot"
51+
user_email: "kendouiteam@progress.com"
52+
53+
standalone-examples-node18:
54+
runs-on: ubuntu-latest
5755

58-
- name: Cleanup
59-
run: git clean -xdf
56+
permissions:
57+
id-token: write # Required by Akeyless
58+
contents: read
59+
packages: read
6060

61+
steps:
62+
- name: Import Secrets
63+
id: import-secrets
64+
uses: LanceMcCarthy/akeyless-action@v3
65+
with:
66+
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
67+
static-secrets: '{ "/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN" }'
68+
export-secrets-to-environment: false
69+
70+
- name: Use NodeJS v18
71+
uses: actions/setup-node@v4
72+
with:
73+
node-version: "18"
74+
75+
- name: Check out repository
76+
uses: actions/checkout@v4
77+
78+
- name: Build
79+
run: |
80+
chmod +x ./examples-standalone/bin/build-gh-pages
81+
./examples-standalone/bin/build-gh-pages
82+
env:
83+
KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }}
84+
85+
- name: Deploy to GH Pages
86+
uses: peaceiris/actions-gh-pages@v3
87+
with:
88+
github_token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
89+
publish_dir: ./examples-standalone/dist
90+
user_name: "kendo-bot"
91+
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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
for PROJECT in "${STANDALONE_PROJECTS[@]}"
10+
do
11+
pushd ./examples-standalone/${PROJECT} > /dev/null
12+
13+
echo Building ${PROJECT}
14+
npm ci
15+
rm -rf dist
16+
npx ng build --configuration production --base-href
17+
mv dist/${PROJECT} ../../examples-standalone/dist
18+
19+
popd > /dev/null
20+
done
21+

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)