88 - master
99 - vnext
1010 workflow_dispatch :
11- workflow_dispatch :
1211 inputs :
1312 branch :
1413 description : ' Input a branch name (e.g., vnext)'
@@ -27,23 +26,23 @@ jobs:
2726 - name : app
2827 custom_command : run generate-live-editing
2928 submodule_dir : angular-demos
30- base_href : / angular-demos/
29+ base_href : angular-demos
3130 target_folder : dist/app
3231 npm_build_command : run build-ci
3332 repositoryfy : true
3433 repositoryfy_command : repositoryfyAngularDemos
3534 - name : app-crm
3635 custom_command : run generate-live-editing:app-crm
3736 submodule_dir : angular-demos-crm
38- base_href : / angular-demos-grid-crm/
37+ base_href : angular-demos-grid-crm
3938 target_folder : dist/app-crm
4039 npm_build_command : run build-ci:app-crm --loglevel verbose
4140 repositoryfy : false
4241 repositoryfy_command : ' '
4342 - name : app-lob
4443 custom_command : run generate-live-editing:app-lob
4544 submodule_dir : angular-demos-lob
46- base_href : / angular-demos-lob/
45+ base_href : angular-demos-lob
4746 target_folder : dist/app-lob
4847 npm_build_command : run build-ci:app-lob
4948 repositoryfy : true
5453 uses : actions/checkout@v4
5554 with :
5655 fetch-depth : 0
56+ ref : ${{ env.BRANCH_REF }}
5757 token : ${{ secrets.GITHUB_TOKEN }}
5858
5959 - name : Setup Node.js
@@ -76,36 +76,41 @@ jobs:
7676 }
7777
7878 - name : Create .npmrc file
79- run : touch .npmrc
79+ run : |
80+ if [ -f ".npmrc" ]; then
81+ rm .npmrc
82+ fi
83+ touch .npmrc
84+
8085
8186 - name : Configure npm registry
8287 run : |
8388 echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> .npmrc
84- echo "//packages.infragistics.com/npm/js-licensed/:_authToken=${{ secrets.INFRAGISTICS_NPM_TOKEN }}" >> .npmrc
89+ echo "//packages.infragistics.com/npm/js-licensed/:username=${{ secrets.INFRAGISTICS_NPM_USER }}" >> .npmrc
90+ echo "//packages.infragistics.com/npm/js-licensed/:_auth=${{ secrets.INFRAGISTICS_NPM_TOKEN }}" >> .npmrc
91+ # echo "//packages.infragistics.com/npm/js-licensed/:_authToken=${{ secrets.INFRAGISTICS_NPM_TOKEN }}" >> .npmrc
8592
8693 - name : Install dependencies
87- run : npm install --legacy-peer-deps
88- env :
89- GITHUB_ACTIONS : true
94+ run : npm install
9095
9196 - name : Clone submodule
9297 run : git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples
9398
9499 - name : Checkout branch in submodule (vNext)
95- if : env.BRANCH_REF == 'refs/heads/vnext'
100+ if : ${{ env.BRANCH_REF == 'refs/heads/vnext' }}
96101 run : |
97102 cd igniteui-live-editing-samples
98103 git checkout vNext
99104
100105 - name : Checkout branch in submodule (master)
101- if : env.BRANCH_REF == 'refs/heads/master'
106+ if : ${{ env.BRANCH_REF == 'refs/heads/master' }}
102107 run : |
103108 cd igniteui-live-editing-samples
104109 git checkout master
105110
106111 - name : Update package.json with base href
107112 run : |
108- sed -i 's/ --configuration production/ --base-href=${{ matrix.base_href }} --configuration production/ g' package.json
113+ sed -i 's| --configuration production| --base-href=${{ matrix.base_href }} --configuration production| g' package.json
109114
110115 - name : Generate live-editing
111116 run : npm ${{ matrix.custom_command }}
@@ -115,9 +120,7 @@ jobs:
115120 npx --userconfig=./.npmrc ng g @igniteui/angular-schematics:upgrade-packages --skip-install
116121
117122 - name : Install dependencies after schematics
118- run : npm install --legacy-peer-deps
119- env :
120- GITHUB_ACTIONS : true
123+ run : npm install
121124
122125 - name : Build application
123126 run : npm ${{ matrix.npm_build_command }} --userconfig=./.npmrc
@@ -144,35 +147,32 @@ jobs:
144147 - name : Create zip artifact
145148 run : |
146149 cd ${{ matrix.target_folder }}/browser
147- zip -r ../../ ${{ matrix.submodule_dir }}-artifact.zip ./
150+ zip -r ${{ github.workspace }}/ ${{ matrix.base_href }}-artifact.zip ./
148151
149152 - name : Upload artifact
150153 uses : actions/upload-artifact@v4
151154 with :
152- name : ${{ matrix.submodule_dir }}-artifact
153- path : ${{ matrix.submodule_dir }}-artifact.zip
155+ name : ${{ matrix.base_href }}-artifact
156+ path : ${{ matrix.base_href }}-artifact.zip
157+ retention-days : 1
154158
155159 - name : Repositorify (vNext)
156- if : env.BRANCH_REF == 'refs/heads/vnext' && matrix.repositoryfy == true
160+ if : ${{ env.BRANCH_REF == 'refs/heads/vnext' && matrix.repositoryfy == true }}
157161 run : npm run ${{ matrix.repositoryfy_command }}
158162
159163 - name : Repositorify (Production)
160- if : env.BRANCH_REF == 'refs/heads/master' && matrix.repositoryfy == true
164+ if : ${{ env.BRANCH_REF == 'refs/heads/master' && matrix.repositoryfy == true }}
161165 run : npm run ${{ matrix.repositoryfy_command }}:prod
162166
163- - name : Stage changes
164- if : matrix.repositoryfy == true
165- run : |
166- cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
167- git add .
168-
169167 - name : Check for changes
170168 if : matrix.repositoryfy == true
171169 id : check_changes
172170 run : |
173171 cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
174- if [ -n "$(git status --porcelain)" ]; then
172+ if [ -n "$(git status --porcelain . )" ]; then
175173 echo "changes_detected=true" >> $GITHUB_OUTPUT
174+ echo "Changed files:"
175+ git status --porcelain .
176176 else
177177 echo "changes_detected=false" >> $GITHUB_OUTPUT
178178 echo "No changes to commit."
@@ -184,32 +184,35 @@ jobs:
184184 cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
185185 git config --global user.name "github-actions[bot]"
186186 git config --global user.email "github-actions[bot]@users.noreply.github.com"
187+ git add .
187188 git commit -m "Automated repository update"
189+ continue-on-error : true
188190
189191 - name : Push changes
190192 if : matrix.repositoryfy == true && steps.check_changes.outputs.changes_detected == 'true'
191193 run : |
192194 cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
193- git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/IgniteUI/igniteui-live-editing-samples.git
195+ git push https://x-access-token:${{ secrets.CLASSIC_PAT_GITHUB }}@github.com/IgniteUI/igniteui-live-editing-samples.git
194196 continue-on-error : true
195197
196198 - name : Trigger Deploy Workflow in IgniteUI Actions
197199 uses : actions/github-script@v8
198200 with :
199- github-token : ${{ secrets.CLASSIC_PATKA }}
201+ github-token : ${{ secrets.CLASSIC_PAT_GITHUB }}
200202 script : |
201203 await github.rest.repos.createDispatchEvent({
202204 owner: 'IgniteUI',
203205 repo: 'igniteui-actions',
204206 event_type: 'igniteui-angular-samples-cd',
205207 client_payload: {
208+ calling_branch: "${{ env.BRANCH_REF }}",
206209 repository: "${{ github.repository }}",
207210 run_id: "${{ github.run_id }}",
208211 artifact_name: "${{ matrix.submodule_dir }}-artifact",
212+ base_href: "${{ matrix.base_href }}",
213+ submodule_dir: "${{ matrix.submodule_dir }}",
209214 ref: "${{ github.ref }}",
210215 sha: "${{ github.sha }}",
211216 branch: '${{ github.ref_name }}',
212- unit: false,
213- integration: true
214217 }
215218 });
0 commit comments