ci: fix server build (#3541)
This commit is contained in:
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@@ -59,6 +59,24 @@ jobs:
|
|||||||
- name: Run Type Check
|
- name: Run Type Check
|
||||||
run: yarn typecheck
|
run: yarn typecheck
|
||||||
|
|
||||||
|
build-server:
|
||||||
|
name: Build Server
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: development
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: ./.github/actions/setup-node
|
||||||
|
with:
|
||||||
|
electron-install: false
|
||||||
|
- name: Build Server
|
||||||
|
run: yarn nx build @affine/server
|
||||||
|
- name: Upload server dist
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: server-dist
|
||||||
|
path: ./apps/server/dist
|
||||||
|
if-no-files-found: error
|
||||||
build-docs:
|
build-docs:
|
||||||
name: Build Docs
|
name: Build Docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -483,10 +501,8 @@ jobs:
|
|||||||
build-docker:
|
build-docker:
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
name: Build Docker
|
name: Build Docker
|
||||||
needs:
|
|
||||||
- desktop-test
|
|
||||||
- server-test
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-server
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Download core artifact
|
- name: Download core artifact
|
||||||
@@ -494,9 +510,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: core
|
name: core
|
||||||
path: ./apps/core/dist
|
path: ./apps/core/dist
|
||||||
- name: Compile server code
|
- name: Download server dist
|
||||||
run: tsc -b
|
uses: actions/download-artifact@v3
|
||||||
working-directory: ./apps/server
|
with:
|
||||||
|
name: server-dist
|
||||||
|
path: ./apps/server/dist
|
||||||
- name: Download storage.node
|
- name: Download storage.node
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"run-test": "./scripts/run-test.ts"
|
"run-test": "./scripts/run-test.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
"dev": "nodemon ./src/index.ts",
|
"dev": "nodemon ./src/index.ts",
|
||||||
"test": "yarn exec ts-node-esm ./scripts/run-test.ts all",
|
"test": "yarn exec ts-node-esm ./scripts/run-test.ts all",
|
||||||
"test:watch": "yarn exec ts-node-esm ./scripts/run-test.ts all --watch",
|
"test:watch": "yarn exec ts-node-esm ./scripts/run-test.ts all --watch",
|
||||||
|
|||||||
Reference in New Issue
Block a user