File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -37,23 +37,26 @@ jobs:
3737 needs : build-test
3838 runs-on : ubuntu-latest
3939 environment : production
40+ # Hard-code the app name here to avoid VS Code warnings from vars.*
41+ env :
42+ AZURE_WEBAPP_NAME : devops-starter-webapp-dev31
4043 steps :
4144 - name : Checkout
4245 uses : actions/checkout@v4
4346
44- # Sanity check: ensures secret/variable exist at runtime
45- - name : Check contexts
47+ # Sanity check: ensure secret exists at runtime (won’t print it)
48+ - name : Check publish profile presence
4649 run : |
47- echo "AZURE_WEBAPP_NAME=${{ vars.AZURE_WEBAPP_NAME }}"
48- if [ -z "${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}" ]; then
49- echo "❌ Missing AZURE_WEBAPP_PUBLISH_PROFILE secret"; exit 1
50+ if [ -z "${{ secrets['AZURE_WEBAPP_PUBLISH_PROFILE'] }}" ]; then
51+ echo "❌ Missing secret: AZURE_WEBAPP_PUBLISH_PROFILE"; exit 1
5052 else
5153 echo "✅ Publish profile secret present"
5254 fi
5355
5456 - name : Azure WebApp Deploy
5557 uses : azure/webapps-deploy@v3
5658 with :
57- app-name : ${{ vars.AZURE_WEBAPP_NAME }}
58- publish-profile : ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
59+ app-name : ${{ env.AZURE_WEBAPP_NAME }}
60+ # Use bracket notation; the action reads the secret at runtime
61+ publish-profile : ${{ secrets['AZURE_WEBAPP_PUBLISH_PROFILE'] }}
5962 package : .
You can’t perform that action at this time.
0 commit comments