Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
build: disable npm warn on gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
beetcb committed Feb 23, 2021
1 parent ff5e8ac commit 450ad26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
path: |
**/node_modules
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}

- name: Install deps
run: npm i --only=production >> /dev/null
run: npm i --only=production -s

- name: 加载学校及用户信息
run: node ./src/cli.js load
Expand Down
12 changes: 8 additions & 4 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,15 @@ class School {
res = await JSON.parse(await res.text())

const origin = new URL(res.data[0].ampUrl).origin
// Proxy the host who blocks foreign ip access
const casOrigin = process.env.GITHUB_ACTION
? 'https://lean.beetcb.com/authserver'
: res.data[0].idsUrl
const schoolName = res.data[0].name

let casOrigin = res.data[0].idsUrl
// Proxy the host who blocks foreign ip access
if (process.env.GITHUB_ACTION && name === 'whpu') {
casOrigin = 'https://lean.beetcb.com/authserver'
console.warn(`${schoolName}:尝试使用代理访问`)
}

return {
name: schoolName,
casOrigin,
Expand Down

0 comments on commit 450ad26

Please sign in to comment.