Skip to content

ci: update GitHub CI #221

ci: update GitHub CI

ci: update GitHub CI #221

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
name: Page Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts
check-latest: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node modules
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js dependencies
run: yarn install
- name: Page Build
env:
REACT_APP_SITE_TITLE: 哈尔滨工业大学开源镜像站
REACT_APP_ORG_NAME: 哈尔滨工业大学Linux用户协会
REACT_APP_ORG_LINK: https://github.com/hitlug
REACT_APP_SPONSOR_NAME: 哈尔滨工业大学网络与信息中心
GENERATE_SOURCEMAP: false
run: yarn build
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Production Build
path: build
buildsz:
name: Page Build(深圳)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts
check-latest: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node modules
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js dependencies
run: yarn install
- name: Page Build
env:
REACT_APP_SITE_TITLE: 哈尔滨工业大学(深圳)开源镜像站
REACT_APP_ORG_NAME: 哈尔滨工业大学(深圳)计算机研究协会
REACT_APP_ORG_LINK: https://github.com/hitszcra
REACT_APP_SPONSOR_NAME: 哈尔滨工业大学(深圳)实验与创新实践中心
GENERATE_SOURCEMAP: false
run: yarn build
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Production Build(深圳)
path: build