Skip to content

Commit 0d9cbcf

Browse files
committed
add deployment config for azure
1 parent a874d29 commit 0d9cbcf

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

.github/workflows/main_text-compare2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: npm install, build, and test
2727
run: |
2828
npm install
29-
npm run build
29+
npm run build:azure
3030
npm run test:headless
3131
3232
- name: Upload artifact for deployment job

angular.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,25 @@
4242
"browser": "src/main.ts"
4343
},
4444
"configurations": {
45+
"azure": {
46+
"budgets": [
47+
{
48+
"type": "anyComponentStyle",
49+
"maximumWarning": "6kb"
50+
}
51+
],
52+
"optimization": true,
53+
"outputHashing": "all",
54+
"sourceMap": false,
55+
"namedChunks": false,
56+
"extractLicenses": true,
57+
"fileReplacements": [
58+
{
59+
"replace": "src/environments/environment.ts",
60+
"with": "src/environments/environment.azure.ts"
61+
}
62+
]
63+
},
4564
"nas": {
4665
"budgets": [
4766
{
@@ -90,6 +109,9 @@
90109
"buildTarget": "text-compare-angular:build"
91110
},
92111
"configurations": {
112+
"azure": {
113+
"buildTarget": "text-compare-angular:build:azure"
114+
},
93115
"nas": {
94116
"buildTarget": "text-compare-angular:build:nas"
95117
},

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"start:nas": "ng serve --configuration nas",
1313
"start:mock": "node server.js",
1414
"build": "ng build --configuration production",
15+
"build:azure": "ng build --configuration azure",
1516
"build:nas": "ng build --configuration nas",
1617
"build:cross:env": "rimraf dist compiled && cross-env SOURCE_MAP=0 ng build --configuration production",
1718
"test": "ng test",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const environment = {
2+
production: true,
3+
env_name: 'Azure'
4+
};

0 commit comments

Comments
 (0)