mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2025-12-07 04:43:11 +00:00
chore: 优化 Azure 工作流配置,调整环境变量和格式化注释
This commit is contained in:
parent
752f6b6bd1
commit
ba96069a9b
@ -22,8 +22,10 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
lfs: false
|
||||
|
||||
- name: Install OIDC Client from Core Package
|
||||
run: npm install @actions/core@1.6.0 @actions/http-client
|
||||
|
||||
- name: Get Id Token
|
||||
uses: actions/github-script@v6
|
||||
id: idtoken
|
||||
@ -32,17 +34,19 @@ jobs:
|
||||
const coredemo = require('@actions/core')
|
||||
return await coredemo.getIDToken()
|
||||
result-encoding: string
|
||||
|
||||
- name: Build And Deploy
|
||||
id: builddeploy
|
||||
uses: Azure/static-web-apps-deploy@v1
|
||||
env:
|
||||
NODE_VERSION: 20 # 👈 Force Node.js 20.x instead of Oryx default (18.x)
|
||||
with:
|
||||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_RIVER_041D8AB00 }}
|
||||
action: "upload"
|
||||
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
|
||||
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
|
||||
app_location: "/" # App source code path
|
||||
api_location: "" # Api source code path - optional
|
||||
output_location: "dist" # Built app content directory - optional
|
||||
###### Repository/Build Configurations ######
|
||||
app_location: "/"
|
||||
api_location: ""
|
||||
output_location: "dist"
|
||||
github_id_token: ${{ steps.idtoken.outputs.result }}
|
||||
###### End of Repository/Build Configurations ######
|
||||
|
||||
@ -55,4 +59,4 @@ jobs:
|
||||
id: closepullrequest
|
||||
uses: Azure/static-web-apps-deploy@v1
|
||||
with:
|
||||
action: "close"
|
||||
action: "close"
|
||||
Loading…
x
Reference in New Issue
Block a user