Jeffrey Hsu c9e44c1c3f
All checks were successful
CI / build (push) Successful in 3m22s
更新 .gitea/workflows/build.yaml
2024-10-31 17:57:35 +08:00

46 lines
1.0 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
run: |
git clone https://cantyonion.site/git/cantyonion/WebIndex.git
- name: Set up Node.js
uses: https://gitea.com/actions/setup-node@v4
with:
node-version: '22' # 可以根据需要选择 Node.js 版本
- name: Set NPM Mirror
run: npm config set registry https://registry.npmmirror.com
- name: Install dependencies
working-directory: WebIndex
run: npm install
- name: Build project
working-directory: WebIndex
run: npm run build
- name: Compress build artifacts
run: |
mkdir -p artifacts
zip -r artifacts/build.zip WebIndex/dist/
- name: Upload Release Asset
uses: https://gitea.com/actions/gitea-release-action@v1
with:
files: |-
artifacts/build.zip