add node workflow

This commit is contained in:
c9s 2022-06-07 22:38:41 +08:00
parent cca813e5e5
commit 88f22468bf
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 47 additions and 7 deletions

40
.github/workflows/node.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Node.js CI
on:
push:
branches: [ main ]
paths:
- apps/backtest-report
- frontend
pull_request:
branches: [ main ]
paths:
- apps/backtest-report
- frontend
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x ]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- name: Install
run: yarn install
working-directory: "apps/backtest-report"
- name: Build
run: yarn run next build
working-directory: "apps/backtest-report"
- name: Export
run: yarn run next export
working-directory: "apps/backtest-report"
- run: yarn export
working-directory: "frontend"

View File

@ -3,11 +3,11 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"dev": "yarn run next dev",
"build": "yarn run next build",
"start": "next start",
"lint": "next lint",
"export": "next build && next export"
"export": "yarn run next build && yarn run next export"
},
"dependencies": {
"@mantine/core": "^4.2.5",

View File

@ -3,10 +3,10 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"export": "next build && next export"
"dev": "yarn run next dev",
"build": "yarn run next build",
"start": "yarn run next start",
"export": "yarn run next build && yarn run next export"
},
"dependencies": {
"@material-ui/core": "^4.11.2",