Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/main_text-compare2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,31 @@ jobs:
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
npm run build:azure
npm run test:headless

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: .
path: ./dist/browser

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: 'text-compare2'
slot-name: 'Production'
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_23137CCA3349499E9B3DCC0705F4C348 }}
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_23137CCA3349499E9B3DCC0705F4C348 }}
clean: true
66 changes: 66 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,63 @@
"browser": "src/main.ts"
},
"configurations": {
"azure": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.azure.ts"
}
]
},
"netlify": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.netlify.ts"
}
]
},
"render": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.render.ts"
}
]
},
"nas": {
"budgets": [
{
Expand Down Expand Up @@ -90,6 +147,15 @@
"buildTarget": "text-compare-angular:build"
},
"configurations": {
"azure": {
"buildTarget": "text-compare-angular:build:azure"
},
"netlify": {
"buildTarget": "text-compare-angular:build:netlify"
},
"render": {
"buildTarget": "text-compare-angular:build:render"
},
"nas": {
"buildTarget": "text-compare-angular:build:nas"
},
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"start:nas": "ng serve --configuration nas",
"start:mock": "node server.js",
"build": "ng build --configuration production",
"build:azure": "ng build --configuration azure",
"build:netlify": "ng build --configuration netlify",
"build:render": "ng build --configuration render",
"build:nas": "ng build --configuration nas",
"build:cross:env": "rimraf dist compiled && cross-env SOURCE_MAP=0 ng build --configuration production",
"test": "ng test",
Expand Down
4 changes: 4 additions & 0 deletions src/environments/environment.azure.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const environment = {
production: true,
env_name: 'Azure'
};
4 changes: 4 additions & 0 deletions src/environments/environment.netlify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const environment = {
production: true,
env_name: 'Netlify'
};
4 changes: 4 additions & 0 deletions src/environments/environment.render.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const environment = {
production: true,
env_name: 'Render'
};