-
Notifications
You must be signed in to change notification settings - Fork 102
137 lines (112 loc) · 4.62 KB
/
publish-demos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Publish Demos to GH Pages
on:
workflow_dispatch:
push:
tags:
- 'release-*'
jobs:
publish-ES:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js v20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install jq
run: sudo apt-get install -y jq
- name: Read version from package.json and append "-stable"
run: echo echo "STABLE_VERSION=$(jq -r '.version' package.json | awk -F. '{print $1 "." $2}')-stable" >> $GITHUB_ENV
- name: Install Dependencies
run: npm install
- name: Install Internal Packages
uses: DevExpress/github-actions/install-internal-package@main
with:
install-dist: true
- name: Install stable devextreme pacakges
run: npm install devextreme-angular@${{ env.STABLE_VERSION }} devextreme-react@${{ env.STABLE_VERSION }} devextreme-vue@${{ env.STABLE_VERSION }}
- name: Copy metadata
run: npm run make-demos-bundle -- --copy-metadata
- name: Prepare React demo bundles
run: npm run make-demos-bundle -- --framework React
- name: Prepare Vue demo bundles
run: npm run make-demos-bundle -- --framework Vue
- name: Save publish-demos directory for ES as an artifact
uses: actions/upload-artifact@v3
with:
name: publish-demos
path: ./publish-demos
publish-angular:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Check generated demos (1/10)
command: CONSTEL=1/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (2/10)
command: CONSTEL=2/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (3/10)
command: CONSTEL=3/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (4/10)
command: CONSTEL=4/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (5/10)
command: CONSTEL=5/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (6/10)
command: CONSTEL=6/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (7/10)
command: CONSTEL=7/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (8/10)
command: CONSTEL=8/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (9/10)
command: CONSTEL=9/10 npm run make-demos-bundle -- --framework Angular
- name: Check generated demos (10/10)
command: CONSTEL=10/10 npm run make-demos-bundle -- --framework Angular
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install jq
run: sudo apt-get install -y jq
- name: Read version from package.json and append "-stable"
run: echo echo "STABLE_VERSION=$(jq -r '.version' package.json | awk -F. '{print $1 "." $2}')-stable" >> $GITHUB_ENV
- name: Install Dependencies
run: npm install
- name: Install Internal Packages
uses: DevExpress/github-actions/install-internal-package@main
with:
install-dist: true
- name: Install stable devextreme pacakges
run: npm install devextreme-angular@${{ env.STABLE_VERSION }} devextreme-react@${{ env.STABLE_VERSION }} devextreme-vue@${{ env.STABLE_VERSION }}
- name: Copy metadata
run: npm run make-demos-bundle -- --copy-metadata
- name: Update angular.json
run: npm run update-angular-json
- name: Create angular entryPoints to compile faster
run: npm run launch-ngcc
- name: Prepare Angular demo bundles
run: |
${{ matrix.command }}
- name: Save publish-demos directory for Angular as an artifact
uses: actions/upload-artifact@v3
with:
name: publish-demos
path: ./publish-demos
deploy:
runs-on: ubuntu-latest
needs: [publish-ES, publish-angular]
steps:
- name: Download publish-demos artifact
uses: actions/download-artifact@v3
with:
name: publish-demos
path: ./publish-demos
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publish-demos