Skip to content

Commit 8b6a632

Browse files
authored
update github pages yaml files (#1346)
1 parent 9a2388f commit 8b6a632

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Deploy GitHub Pages
33
on:
44
push:
55
branches: [ $(yamlDefaultBranch) ]
6-
pull_request:
7-
branches: [ $(yamlDefaultBranch) ]
6+
workflow_dispatch: {}
87

98
jobs:
109
build-and-deploy:
@@ -38,6 +37,8 @@ jobs:
3837
run: find ./dist/assets -name "*.js" -exec sed -i 's|src/assets|${{ github.event.repository.name }}/assets|g' {} +
3938
- name: Copy Resources to dist
4039
run: mkdir -p ./dist/assets && cp -R ./src/assets/* ./dist/assets/
40+
- name: SPA routing handling
41+
run: cp .dist/index.html .dist/404.html
4142
- name: Upload build artifact to GitHub Pages
4243
uses: actions/upload-pages-artifact@v1
4344
with:

packages/cli/templates/webcomponents/igc-ts/projects/_base/files/__dot__github/workflows/github-pages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Deploy GitHub Pages
33
on:
44
push:
55
branches: [ $(yamlDefaultBranch) ]
6-
pull_request:
7-
branches: [ $(yamlDefaultBranch) ]
6+
workflow_dispatch: {}
87

98
jobs:
109
build-and-deploy:
@@ -40,6 +39,8 @@ jobs:
4039
run: cp ./ig-theme.css ./dist/
4140
- name: Update href Paths for ig-theme.css
4241
run: find ./dist -type f -exec sed -i "s|href=\"../../ig-theme.css\"|href=\"../../${{ github.event.repository.name }}/ig-theme.css\"|g" {} +
42+
- name: SPA routing handling
43+
run: cp .dist/index.html .dist/404.html
4344
- name: Upload build artifact to GitHub Pages
4445
uses: actions/upload-pages-artifact@v1
4546
with:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Deploy GitHub Pages
33
on:
44
push:
55
branches: [ <%=yamlDefaultBranch%> ]
6-
pull_request:
7-
branches: [ <%=yamlDefaultBranch%> ]
6+
workflow_dispatch: {}
87

98
jobs:
109
build-and-deploy:
@@ -44,6 +43,8 @@ jobs:
4443
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4544
- name: Update Resource Paths
4645
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" {} +
46+
- name: SPA routing handling
47+
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
4748
- name: Upload build artifact to GitHub Pages
4849
uses: actions/upload-pages-artifact@v1
4950
with:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Deploy GitHub Pages
33
on:
44
push:
55
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
6+
workflow_dispatch: {}
87

98
jobs:
109
build-and-deploy:
@@ -44,6 +43,8 @@ jobs:
4443
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4544
- name: Update Resource Paths
4645
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" {} +
46+
- name: SPA routing handling
47+
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
4748
- name: Upload build artifact to GitHub Pages
4849
uses: actions/upload-pages-artifact@v1
4950
with:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Deploy GitHub Pages
33
on:
44
push:
55
branches: [ <%=yamlDefaultBranch%> ]
6-
pull_request:
7-
branches: [ <%=yamlDefaultBranch%> ]
6+
workflow_dispatch: {}
87

98
jobs:
109
build-and-deploy:
@@ -44,6 +43,8 @@ jobs:
4443
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4544
- name: Update Resource Paths
4645
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" {} +
46+
- name: SPA routing handling
47+
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
4748
- name: Upload build artifact to GitHub Pages
4849
uses: actions/upload-pages-artifact@v1
4950
with:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Deploy GitHub Pages
33
on:
44
push:
55
branches: [ <%=yamlDefaultBranch%> ]
6-
pull_request:
7-
branches: [ <%=yamlDefaultBranch%> ]
6+
workflow_dispatch: {}
87

98
jobs:
109
build-and-deploy:
@@ -44,6 +43,8 @@ jobs:
4443
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
4544
- name: Update Resource Paths
4645
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" {} +
46+
- name: SPA routing handling
47+
run: cp ${{ env.BUILD_PATH }}/index.html ${{ env.BUILD_PATH }}/404.html
4748
- name: Upload build artifact to GitHub Pages
4849
uses: actions/upload-pages-artifact@v1
4950
with:

0 commit comments

Comments
 (0)