Skip to content

Commit 4a8e606

Browse files
committed
(#289) Deploy to Azure Static Web Apps
1 parent c512d1e commit 4a8e606

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed

deployments/Azure/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,28 @@ az webapp create --resource-group "ClassifiedAds_DEV" \
228228
--tags "Environment=Development" "Project=ClassifiedAds" "Department=SD"
229229
```
230230

231+
- Create Static Web Apps
232+
```
233+
az staticwebapp create --resource-group "ClassifiedAds_DEV" \
234+
--name angular \
235+
--location "eastasia" \
236+
--sku Free \
237+
--tags "Environment=Development" "Project=ClassifiedAds" "Department=SD"
238+
239+
az staticwebapp create --resource-group "ClassifiedAds_DEV" \
240+
--name react \
241+
--location "eastasia" \
242+
--sku Free \
243+
--tags "Environment=Development" "Project=ClassifiedAds" "Department=SD"
244+
245+
az staticwebapp create --resource-group "ClassifiedAds_DEV" \
246+
--name vue \
247+
--location "eastasia" \
248+
--sku Free \
249+
--tags "Environment=Development" "Project=ClassifiedAds" "Department=SD"
250+
```
251+
252+
231253
- Configure Connection String
232254
```
233255
connectionString=$(az sql db show-connection-string -s classifiedadsdev -n classifiedadsdevdb -c ado.net --out tsv)

src/UIs/angular/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,21 @@ setx SONAR_TOKEN <token>
3434
set SONAR_TOKEN=<token>
3535
sonar-scanner.bat -D"sonar.organization=phongnguyend" -D"sonar.projectKey=UIs_Angular" -D"sonar.projectName=UIs Angular" -D"sonar.projectVersion=1.0.0.0" -D"sonar.sources=." -D"sonar.host.url=https://sonarcloud.io"
3636
```
37+
38+
### Deploy to Azure Static Web App
39+
- Create **staticwebapp.config.json** in the **./dist/angular/browser** folder
40+
```json
41+
{
42+
"navigationFallback": {
43+
"rewrite": "/index.html"
44+
}
45+
}
46+
```
47+
- Install Azure Static Web Apps CLI
48+
```bash
49+
npm install -g @azure/static-web-apps-cli
50+
```
51+
- Deploy
52+
```bash
53+
swa deploy ./dist/angular/browser --app-name angular --env production
54+
```

src/UIs/reactjs/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,27 @@ export default {
3131

3232
### SonarQube
3333

34-
```
34+
```bash
3535
echo %SONAR_TOKEN%
3636
setx SONAR_TOKEN <token>
3737
set SONAR_TOKEN=<token>
3838
sonar-scanner.bat -D"sonar.organization=phongnguyend" -D"sonar.projectKey=UIs_React" -D"sonar.projectName=UIs React" -D"sonar.projectVersion=1.0.0.0" -D"sonar.sources=." -D"sonar.host.url=https://sonarcloud.io"
3939
```
40+
41+
### Deploy to Azure Static Web App
42+
- Create **staticwebapp.config.json** in the **./dist** folder
43+
```json
44+
{
45+
"navigationFallback": {
46+
"rewrite": "/index.html"
47+
}
48+
}
49+
```
50+
- Install Azure Static Web Apps CLI
51+
```bash
52+
npm install -g @azure/static-web-apps-cli
53+
```
54+
- Deploy
55+
```bash
56+
swa deploy ./dist --app-name react --env production
57+
```

src/UIs/vuejs/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,21 @@ setx SONAR_TOKEN <token>
4646
set SONAR_TOKEN=<token>
4747
sonar-scanner.bat -D"sonar.organization=phongnguyend" -D"sonar.projectKey=UIs_Vue" -D"sonar.projectName=UIs Vue" -D"sonar.projectVersion=1.0.0.0" -D"sonar.sources=." -D"sonar.host.url=https://sonarcloud.io"
4848
```
49+
50+
### Deploy to Azure Static Web App
51+
- Create **staticwebapp.config.json** in the **./dist** folder
52+
```json
53+
{
54+
"navigationFallback": {
55+
"rewrite": "/index.html"
56+
}
57+
}
58+
```
59+
- Install Azure Static Web Apps CLI
60+
```bash
61+
npm install -g @azure/static-web-apps-cli
62+
```
63+
- Deploy
64+
```bash
65+
swa deploy ./dist --app-name vue --env production
66+
```

0 commit comments

Comments
 (0)