refactor!: remove next.js (#3267)

This commit is contained in:
Alex Yang
2023-07-19 00:53:10 +08:00
committed by GitHub
parent 79227a1e7c
commit 47f12f77f2
296 changed files with 4115 additions and 3617 deletions

View File

@@ -1,6 +1,6 @@
FROM openresty/openresty:1.21.4.1-0-buster
WORKDIR /app
COPY ./apps/web/out ./dist
COPY ./apps/core/dist ./dist
COPY ./.github/deployment/front/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY ./.github/deployment/front/affine.nginx.conf /etc/nginx/conf.d/affine.nginx.conf

View File

@@ -101,8 +101,8 @@ jobs:
path: ./apps/storybook/storybook-static
if-no-files-found: error
build-web:
name: Build @affine/web
build-core:
name: Build @affine/core
runs-on: ubuntu-latest
environment: development
@@ -110,13 +110,13 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build Web
run: yarn nx build @affine/web
- name: Upload artifact
- name: Build Core
run: yarn nx build @affine/core
- name: Upload core artifact
uses: actions/upload-artifact@v3
with:
name: next-js-static
path: ./apps/web/out
name: core
path: ./apps/core/dist
if-no-files-found: error
server-test:
@@ -215,7 +215,7 @@ jobs:
matrix:
shard: [1, 2, 3, 4, 5]
environment: development
needs: build-web
needs: build-core
steps:
- uses: actions/checkout@v3
@@ -224,11 +224,11 @@ jobs:
with:
playwright-install: true
electron-install: false
- name: Download artifact
- name: Download core artifact
uses: actions/download-artifact@v3
with:
name: next-js-static
path: ./apps/web/out
name: core
path: ./apps/core/dist
- name: Run playwright tests
run: yarn e2e --forbid-only --shard=${{ matrix.shard }}/${{ strategy.job-total }}
@@ -260,7 +260,7 @@ jobs:
name: E2E Migration Test
runs-on: ubuntu-latest
environment: development
needs: [build-web]
needs: build-core
steps:
- uses: actions/checkout@v3
@@ -270,11 +270,11 @@ jobs:
playwright-install: true
electron-install: false
- name: Download next static
- name: Download core artifact
uses: actions/download-artifact@v3
with:
name: next-js-static
path: ./apps/web/out
name: core
path: ./apps/core/dist
- name: Unzip
run: yarn unzip
@@ -333,7 +333,7 @@ jobs:
target: x86_64-pc-windows-msvc,
test: true,
}
needs: [build-web]
needs: build-core
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
@@ -353,10 +353,10 @@ jobs:
env:
NATIVE_TEST: 'true'
- name: Download static resource artifact
- name: Download core artifact
uses: actions/download-artifact@v3
with:
name: next-js-static
name: core
path: apps/electron/resources/web-static
- name: Build Plugins
@@ -443,11 +443,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download next static
- name: Download core artifact
uses: actions/download-artifact@v3
with:
name: next-js-static
path: ./apps/web/out
name: core
path: ./apps/core/dist
- name: Download server dist
uses: actions/download-artifact@v3
with:

View File

@@ -62,10 +62,10 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
RELEASE_VERSION: ${{ needs.set-build-version.outputs.version }}
- name: Upload Artifact (web-static)
- name: Upload core artifact
uses: actions/upload-artifact@v3
with:
name: before-make-web-static
name: core
path: apps/electron/resources/web-static
make-distribution:

View File

@@ -66,10 +66,10 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
RELEASE_VERSION: ${{ github.event.inputs.version || steps.get-canary-version.outputs.RELEASE_VERSION }}
- name: Upload Artifact (web-static)
- name: Upload core artifact
uses: actions/upload-artifact@v3
with:
name: before-make-web-static
name: core
path: apps/electron/resources/web-static
make-distribution:
@@ -120,7 +120,7 @@ jobs:
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: before-make-web-static
name: core
path: apps/electron/resources/web-static
- name: Build Plugins