1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-12-07 13:03:59 +00:00

chore: 优化 Azure 工作流配置,调整环境变量和格式化注释

This commit is contained in:
Sunwuyuan 2025-11-30 13:48:11 +08:00
parent 752f6b6bd1
commit ba96069a9b
No known key found for this signature in database
GPG Key ID: A6A54CF66F56BB64

View File

@ -22,8 +22,10 @@ jobs:
with: with:
submodules: true submodules: true
lfs: false lfs: false
- name: Install OIDC Client from Core Package - name: Install OIDC Client from Core Package
run: npm install @actions/core@1.6.0 @actions/http-client run: npm install @actions/core@1.6.0 @actions/http-client
- name: Get Id Token - name: Get Id Token
uses: actions/github-script@v6 uses: actions/github-script@v6
id: idtoken id: idtoken
@ -32,17 +34,19 @@ jobs:
const coredemo = require('@actions/core') const coredemo = require('@actions/core')
return await coredemo.getIDToken() return await coredemo.getIDToken()
result-encoding: string result-encoding: string
- name: Build And Deploy - name: Build And Deploy
id: builddeploy id: builddeploy
uses: Azure/static-web-apps-deploy@v1 uses: Azure/static-web-apps-deploy@v1
env:
NODE_VERSION: 20 # 👈 Force Node.js 20.x instead of Oryx default (18.x)
with: with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_RIVER_041D8AB00 }} azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_RIVER_041D8AB00 }}
action: "upload" action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### ###### Repository/Build Configurations ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig app_location: "/"
app_location: "/" # App source code path api_location: ""
api_location: "" # Api source code path - optional output_location: "dist"
output_location: "dist" # Built app content directory - optional
github_id_token: ${{ steps.idtoken.outputs.result }} github_id_token: ${{ steps.idtoken.outputs.result }}
###### End of Repository/Build Configurations ###### ###### End of Repository/Build Configurations ######
@ -55,4 +59,4 @@ jobs:
id: closepullrequest id: closepullrequest
uses: Azure/static-web-apps-deploy@v1 uses: Azure/static-web-apps-deploy@v1
with: with:
action: "close" action: "close"