Skip to content

Commit

Permalink
update azure deplooy
Browse files Browse the repository at this point in the history
  • Loading branch information
la-neumann committed Jan 29, 2025
1 parent 3bd232a commit 8568705
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,45 @@ jobs:
npm run build
npm run download-dist
# Add startup command to Azure
- name: Generate startup command
# Create web.config for Azure
- name: Create web.config
run: |
echo "node server/server.js" > startup.txt
echo '<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="server/server.js" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^server/server.js\/debug[\/]?" />
</rule>
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}"/>
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<action type="Rewrite" url="server/server.js"/>
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<hiddenSegments>
<remove segment="bin"/>
</hiddenSegments>
</requestFiltering>
</security>
<iisnode node_env="production" nodeProcessCommandLine="node"/>
</system.webServer>
</configuration>' > web.config
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v3
with:
app-name: 'uptime-kuma-version-three'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: .
startup-command: 'node server/server.js'
package: .

0 comments on commit 8568705

Please sign in to comment.