File tree Expand file tree Collapse file tree 4 files changed +12
-40
lines changed
_base_with_home/files/__dot__github/workflows
_base/files/__dot__github/workflows
_base_with_home/files/__dot__github/workflows
_base/files/__dot__github/workflows Expand file tree Collapse file tree 4 files changed +12
-40
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments