Skip to content

Commit 28240fd

Browse files
Fixed prod deployment
1 parent 6701767 commit 28240fd

4 files changed

Lines changed: 10 additions & 89 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ jobs:
4343
cp .pwa/favicon-$build_prefix.ico public/img/favicon.ico
4444
rm public/manifest.webmanifest
4545
cp .pwa/manifest-$build_prefix.webmanifest public/manifest.webmanifest
46-
if [ "$build_prefix" = "prod" ]; then
47-
cp .pwa/ngsw-config-prod.json ngsw-config.json
48-
else
49-
cp .pwa/ngsw-config-other.json ngsw-config.json
50-
fi
5146
5247
- name: Build the application
5348
env:
@@ -73,16 +68,6 @@ jobs:
7368
git fetch origin gh-pages
7469
git worktree add deploy-folder gh-pages
7570
76-
- name: backup lower environment files
77-
if: ${{ steps.set-env.outputs.build_env == 'production' }}
78-
env:
79-
build_env: ${{ steps.set-env.outputs.build_env }}
80-
run: |
81-
mkdir -p development-backup
82-
mkdir -p test-backup
83-
cp -r deploy-folder/development/* development-backup/ || true
84-
cp -r deploy-folder/test/* test-backup/ || true
85-
8671
- name: Clean Deployment Directory
8772
env:
8873
path: ${{ steps.set-env.outputs.path }}
@@ -100,6 +85,10 @@ jobs:
10085
mkdir -p "$target_dir"
10186
cp -r dist/cheems-angular/browser/* "$target_dir/"
10287
cp README.md .gitignore "$target_dir/"
88+
if [ "$build_env" = "production" ]; then
89+
cp .pwa/index.html "deploy-folder/"
90+
cp README.md .gitignore "deploy-folder/"
91+
fi
10392
10493
- name: Commit and Deploy to GitHub Pages
10594
working-directory: deploy-folder

.pwa/manifest-prod.webmanifest

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
"short_name": "Cheems Bonk Game",
44
"description": "A fun and interactive game featuring Cheems Bonk.",
55
"display": "standalone",
6-
"scope": "/CheemsBonkGame/",
7-
"start_url": "/CheemsBonkGame/",
6+
"scope": "/CheemsBonkGame/app/",
7+
"start_url": "/CheemsBonkGame/app/",
88
"icons": [
99
{
10-
"src": "/CheemsBonkGame/img/icons/pwa/icon-72x72.png",
10+
"src": "/CheemsBonkGame/app/img/icons/pwa/icon-72x72.png",
1111
"sizes": "72x72",
1212
"type": "image/png",
1313
"purpose": "maskable any"
1414
},
1515
{
16-
"src": "/CheemsBonkGame/img/icons/pwa/icon-144x144.png",
16+
"src": "/CheemsBonkGame/app/img/icons/pwa/icon-144x144.png",
1717
"sizes": "144x144",
1818
"type": "image/png",
1919
"purpose": "maskable any"
2020
},
2121
{
22-
"src": "/CheemsBonkGame/img/icons/pwa/icon-192x192.png",
22+
"src": "/CheemsBonkGame/app/img/icons/pwa/icon-192x192.png",
2323
"sizes": "192x192",
2424
"type": "image/png",
2525
"purpose": "maskable any"
2626
},
2727
{
28-
"src": "/CheemsBonkGame/img/icons/pwa/icon-512x512.png",
28+
"src": "/CheemsBonkGame/app/img/icons/pwa/icon-512x512.png",
2929
"sizes": "512x512",
3030
"type": "image/png",
3131
"purpose": "maskable any"

.pwa/ngsw-config-other.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

.pwa/ngsw-config-prod.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)