mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-08-12 17:40:32 +00:00
Compare commits
No commits in common. "0a1d4a824d0c59608e0e72b0cda2f8a3cefaf6d1" and "cf9352fc1f8ca4b3a410d77618111e6eac864e81" have entirely different histories.
0a1d4a824d
...
cf9352fc1f
@ -1,5 +1,5 @@
|
||||
# Classworks KV 默认服务器域名
|
||||
VITE_DEFAULT_KV_SERVER=https://kv-service.wuyuan.dev
|
||||
VITE_DEFAULT_KV_SERVER=https://kv-service.houlang.cloud
|
||||
|
||||
# Classworks KV 授权服务器域名
|
||||
VITE_DEFAULT_AUTH_SERVER=https://kv.houlang.cloud
|
||||
|
||||
62
.github/workflows/azure-static-web-apps-icy-river-041d8ab00.yml
vendored
Normal file
62
.github/workflows/azure-static-web-apps-icy-river-041d8ab00.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
name: Azure Static Web Apps CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, closed]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_and_deploy_job:
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
|
||||
runs-on: ubuntu-latest
|
||||
name: Build and Deploy Job
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
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
|
||||
with:
|
||||
script: |
|
||||
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 ######
|
||||
app_location: "/"
|
||||
api_location: ""
|
||||
output_location: "dist"
|
||||
github_id_token: ${{ steps.idtoken.outputs.result }}
|
||||
###### End of Repository/Build Configurations ######
|
||||
|
||||
close_pull_request_job:
|
||||
if: github.event_name == 'pull_request' && github.event.action == 'closed'
|
||||
runs-on: ubuntu-latest
|
||||
name: Close Pull Request Job
|
||||
steps:
|
||||
- name: Close Pull Request
|
||||
id: closepullrequest
|
||||
uses: Azure/static-web-apps-deploy@v1
|
||||
with:
|
||||
action: "close"
|
||||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
- name: Build
|
||||
env:
|
||||
VITE_APP_ID: d158067f53627d2b98babe8bffd2fd7d
|
||||
VITE_DEFAULT_KV_SERVER: https://kv-service.wuyuan.dev
|
||||
VITE_DEFAULT_KV_SERVER: https://kv-service.houlang.cloud
|
||||
VITE_DEFAULT_AUTH_SERVER: https://kv.houlang.cloud
|
||||
run: |
|
||||
npm install
|
||||
|
||||
2
.github/workflows/store-pwa.yml
vendored
2
.github/workflows/store-pwa.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VITE_APP_ID: d158067f53627d2b98babe8bffd2fd7d
|
||||
VITE_DEFAULT_KV_SERVER: https://kv-service.wuyuan.dev
|
||||
VITE_DEFAULT_KV_SERVER: https://kv-service.houlang.cloud
|
||||
VITE_DEFAULT_AUTH_SERVER: https://kv.houlang.cloud
|
||||
STORE_PRODUCTION_URL: ${{ inputs.production_url || 'https://cs.houlang.cloud/' }}
|
||||
|
||||
|
||||
@ -257,7 +257,7 @@ export default {
|
||||
if (autoConfigureCloud) {
|
||||
// 使用classworksCloudDefaults配置
|
||||
const classworksCloudDefaults = {
|
||||
"server.domain": import.meta.env.VITE_DEFAULT_KV_SERVER || "https://kv-service.wuyuan.dev",
|
||||
"server.domain": import.meta.env.VITE_DEFAULT_KV_SERVER || "https://kv-service.houlang.cloud",
|
||||
"server.siteKey": "",
|
||||
};
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import { getSetting } from "./settings";
|
||||
|
||||
// Server list for classworkscloud provider (in default priority order)
|
||||
const CLASSWORKS_CLOUD_SERVERS = [
|
||||
"https://kv-service.houlang.cloud",
|
||||
"https://kv-service.wuyuan.dev",
|
||||
];
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ const SETTINGS_CHANGED_EVENT = "classworks:settings:changed";
|
||||
|
||||
// 新增: Classworks云端存储的默认设置
|
||||
const classworksCloudDefaults = {
|
||||
"server.domain": import.meta.env.VITE_DEFAULT_KV_SERVER || "https://kv-service.wuyuan.dev",
|
||||
"server.domain": import.meta.env.VITE_DEFAULT_KV_SERVER || "https://kv-service.houlang.cloud",
|
||||
//"server.domain": "http://localhost:3030",
|
||||
"server.siteKey": "",
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user