build: enhance nx build (#2948)

This commit is contained in:
Alex Yang
2023-07-01 01:17:31 +08:00
committed by GitHub
parent 7a5a5d503a
commit 81c5e6d3d2
27 changed files with 559 additions and 138 deletions

View File

@@ -104,26 +104,6 @@ jobs:
- name: Build Web
run: yarn nx build @affine/web
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: next-js
path: ./apps/web/.next
if-no-files-found: error
build-web-desktop:
name: Build @affine/web (Desktop)
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Export static resources
run: yarn nx export @affine/web
- name: Upload static resources artifact
uses: actions/upload-artifact@v3
with:
name: next-js-static
@@ -242,8 +222,8 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: next-js
path: ./apps/web/.next
name: next-js-static
path: ./apps/web/out
- name: Download storybook artifact
uses: actions/download-artifact@v3
@@ -251,10 +231,6 @@ jobs:
name: storybook
path: ./apps/storybook/storybook-static
- name: Wait for Octobase Ready
run: |
node ./scripts/wait-3000-healthz.mjs
- name: Run playwright tests
run: yarn e2e --forbid-only --shard=${{ matrix.shard }}/${{ strategy.job-total }}
env:
@@ -356,7 +332,7 @@ jobs:
target: x86_64-pc-windows-msvc,
test: true,
}
needs: [build-web-desktop]
needs: [build-web]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js