Skip to content

Commit 68974bf

Browse files
committed
switching to azure web.config
1 parent 6b768f7 commit 68974bf

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/main_product-docs-prod.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ jobs:
4040
- name: Install zip (if needed)
4141
run: sudo apt-get update && sudo apt-get install -y zip
4242

43-
- name: Zip project for Azure run-from-package
43+
- name: Zip static files for Azure deployment
4444
run: |
45-
zip -r build.zip build/ package.json package-lock.json node_modules/
45+
cd build
46+
zip -r ../build.zip *
47+
cd ..
4648
4749
- name: Upload artifact for deployment
4850
uses: actions/upload-artifact@v4

static/web.config

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<system.webServer>
4+
<rewrite>
5+
<rules>
6+
<rule name="React Routes" stopProcessing="true">
7+
<match url=".*" />
8+
<conditions logicalGrouping="MatchAll">
9+
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
10+
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
11+
</conditions>
12+
<action type="Rewrite" url="/" />
13+
</rule>
14+
</rules>
15+
</rewrite>
16+
<staticContent>
17+
<mimeMap fileExtension=".webp" mimeType="image/webp" />
18+
</staticContent>
19+
<defaultDocument>
20+
<files>
21+
<clear />
22+
<add value="index.html" />
23+
</files>
24+
</defaultDocument>
25+
</system.webServer>
26+
</configuration>

0 commit comments

Comments
 (0)