Skip to content

Commit d22c28c

Browse files
Hristo HristovHristo Hristov
authored andcommitted
fix(cli): remove build step from github pages
1 parent 8b6a632 commit d22c28c

File tree

4 files changed

+12
-40
lines changed

4 files changed

+12
-40
lines changed

packages/igx-templates/igx-ts-legacy/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,15 @@ jobs:
3232
- run: npm i # replace with 'npm ci' after committing lock file from first install
3333
- name: Set project name
3434
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
35-
- name: Determine if project is standalone and set build path
36-
run: |
37-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
38-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
39-
else
40-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
41-
fi
4235
- name: Build project with dynamic base-href
4336
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4437
- name: Update Resource Paths
45-
run: find ${{ env.BUILD_PATH }} -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
38+
run: find ./dist/${{ env.PROJECT_NAME }} -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
4639
- name: SPA routing handling
47-
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
40+
run: cp ./dist/${{ env.PROJECT_NAME }}/index.html ./dist/${{ env.PROJECT_NAME }}/404.html
4841
- name: Upload build artifact to GitHub Pages
4942
uses: actions/upload-pages-artifact@v1
5043
with:
51-
path: ${{ env.BUILD_PATH }}
44+
path: ./dist/${{ env.PROJECT_NAME }}
5245
- name: Deploy to GitHub Pages
5346
uses: actions/deploy-pages@v1

packages/igx-templates/igx-ts-legacy/projects/_base_with_home/files/__dot__github/workflows/github-pages.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,15 @@ jobs:
3232
- run: npm i # replace with 'npm ci' after committing lock file from first install
3333
- name: Set project name
3434
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
35-
- name: Determine if project is standalone and set build path
36-
run: |
37-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
38-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
39-
else
40-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
41-
fi
4235
- name: Build project with dynamic base-href
4336
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4437
- name: Update Resource Paths
45-
run: find ${{ env.BUILD_PATH }} -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
38+
run: find ./dist/${{ env.PROJECT_NAME }} -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
4639
- name: SPA routing handling
47-
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
40+
run: cp ./dist/${{ env.PROJECT_NAME }}/index.html ./dist/${{ env.PROJECT_NAME }}/404.html
4841
- name: Upload build artifact to GitHub Pages
4942
uses: actions/upload-pages-artifact@v1
5043
with:
51-
path: ${{ env.BUILD_PATH }}
44+
path: ./dist/${{ env.PROJECT_NAME }}
5245
- name: Deploy to GitHub Pages
5346
uses: actions/deploy-pages@v1

packages/igx-templates/igx-ts/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,15 @@ jobs:
3232
- run: npm i # replace with 'npm ci' after committing lock file from first install
3333
- name: Set project name
3434
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
35-
- name: Determine if project is standalone and set build path
36-
run: |
37-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
38-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
39-
else
40-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
41-
fi
4235
- name: Build project with dynamic base-href
4336
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4437
- name: Update Resource Paths
45-
run: find ${{ env.BUILD_PATH }} -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
38+
run: find ./dist/${{ env.PROJECT_NAME }}/browser -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
4639
- name: SPA routing handling
47-
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
40+
run: cp ./dist/${{ env.PROJECT_NAME }}/browser/index.html ./dist/${{ env.PROJECT_NAME }}/browser/404.html
4841
- name: Upload build artifact to GitHub Pages
4942
uses: actions/upload-pages-artifact@v1
5043
with:
51-
path: ${{ env.BUILD_PATH }}
44+
path: ./dist/${{ env.PROJECT_NAME }}/browser
5245
- name: Deploy to GitHub Pages
5346
uses: actions/deploy-pages@v1

packages/igx-templates/igx-ts/projects/_base_with_home/files/__dot__github/workflows/github-pages.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,15 @@ jobs:
3232
- run: npm i # replace with 'npm ci' after committing lock file from first install
3333
- name: Set project name
3434
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
35-
- name: Determine if project is standalone and set build path
36-
run: |
37-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
38-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
39-
else
40-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
41-
fi
4235
- name: Build project with dynamic base-href
4336
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4437
- name: Update Resource Paths
45-
run: find ${{ env.BUILD_PATH }} -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
38+
run: find ./dist/${{ env.PROJECT_NAME }}/browser -type f -name '*main*.js' -exec sed -i -e "s|/assets|/${{ github.event.repository.name }}/assets|g" -e "s|url('/assets|url('/${{ github.event.repository.name }}/assets|g" {} +
4639
- name: SPA routing handling
47-
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
40+
run: cp ./dist/${{ env.PROJECT_NAME }}/browser/index.html ./dist/${{ env.PROJECT_NAME }}/browser/404.html
4841
- name: Upload build artifact to GitHub Pages
4942
uses: actions/upload-pages-artifact@v1
5043
with:
51-
path: ${{ env.BUILD_PATH }}
44+
path: ./dist/${{ env.PROJECT_NAME }}/browser
5245
- name: Deploy to GitHub Pages
5346
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)