From 4f94588ed039af2c1be38699b5fb99d273896970 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 15:15:59 +0800 Subject: [PATCH 01/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 19 +++++++++++++++++++ .vscode/settings.json | 7 +++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/action.yaml diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml new file mode 100644 index 0000000..c537cc6 --- /dev/null +++ b/.gitea/workflows/action.yaml @@ -0,0 +1,19 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.vscode/settings.json b/.vscode/settings.json index eff4784..7839ae1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,14 @@ { "prettier.enable": false, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "files.associations": { "*.css": "postcss" }, "editor.formatOnSave": false, - "typescript.tsdk": "node_modules/typescript/lib" + "typescript.tsdk": "node_modules/typescript/lib", + "i18n-ally.localesPaths": [ + "locales" + ] } From 67c958c2fd0fc0080631e9cb9ab18440bbd02c38 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 16:10:46 +0800 Subject: [PATCH 02/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index c537cc6..3b7a248 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -4,7 +4,7 @@ on: [push] jobs: Explore-Gitea-Actions: - runs-on: ubuntu-latest + runs-on: server steps: - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" From 32cf212c659a500f7a59c684be86ee5b8e1845eb Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 16:14:01 +0800 Subject: [PATCH 03/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 3b7a248..ffb0365 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -6,14 +6,14 @@ jobs: Explore-Gitea-Actions: runs-on: server steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - name: Check out repository code uses: actions/checkout@v4 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - run: echo "The ${{ gitea.repository }} repository has been cloned to the runner." + - run: echo "The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + - run: echo "This job's status is ${{ job.status }}." From cebd5171794956529b5f05b1314e9845a8f3ea6d Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 16:24:20 +0800 Subject: [PATCH 04/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 16 +++++---------- Dockerfile | 39 +++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index ffb0365..32005c3 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -6,14 +6,8 @@ jobs: Explore-Gitea-Actions: runs-on: server steps: - - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "This job's status is ${{ job.status }}." + - run: docker build --pull --rm -f "Dockerfile" -t website-v1:latest "." + - run: docker rm -f website-v1 || true + - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + - run: docker rmi $(docker images -f "dangling=true" -q) || true + - run: docker ps diff --git a/Dockerfile b/Dockerfile index 74cf702..ef73744 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,35 @@ -FROM node:lts-alpine3.17 +FROM node:21 AS build +# 容器内的目录,通常我们会使用 app 目录 +WORKDIR /app +# 拷贝项目文件到容器/app下 +COPY . . -RUN mkdir -p /web +# ARG env_file -COPY . /web -WORKDIR /web - -RUN npm config set registry https://registry.npm.taobao.org +# RUN npm config set registry https://mirrors.tuna.tsinghua.edu.cn/npm RUN npm install -g pnpm +# RUN pnpm config set registry https://mirrors.tuna.tsinghua.edu.cn/npm +# 下载编译 RUN pnpm i -RUN pnpm build -# RUN rm -rf node_module +# RUN pnpm build +RUN pnpm generate +# RUN yarn build +# RUN yarn generate -ENV HOST 0.0.0.0 -ENV PORT 3000 -EXPOSE 3000 -CMD ["pnpm", "start"] +# nginx默认暴露80端口 +FROM nginx + +# 更换工作目录到nginx服务目录下 +WORKDIR /usr/share/nginx/html + +# 删除服务下可能存在的无用项目 +RUN rm -rf ./* + +# 复制自定义的 Nginx 配置文件 +COPY nginx.conf /etc/nginx/nginx.conf + +# 拷贝打包的文件 +COPY --from=build /app/dist . From d33ec7dfddbeeb6a7a032d705f6cd05daf8e0c41 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 16:45:20 +0800 Subject: [PATCH 05/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 32005c3..79d80bd 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -4,7 +4,9 @@ on: [push] jobs: Explore-Gitea-Actions: - runs-on: server + runs-on: server container: + volumes: + - /run/docker.sock:/run/docker.sock steps: - run: docker build --pull --rm -f "Dockerfile" -t website-v1:latest "." - run: docker rm -f website-v1 || true From db2e08bb8ae1e6e61773e44f19dd637fed54c6d2 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 16:46:50 +0800 Subject: [PATCH 06/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 79d80bd..cacf66a 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -4,9 +4,10 @@ on: [push] jobs: Explore-Gitea-Actions: - runs-on: server container: - volumes: - - /run/docker.sock:/run/docker.sock + runs-on: server + container: + volumes: + - /run/docker.sock:/run/docker.sock steps: - run: docker build --pull --rm -f "Dockerfile" -t website-v1:latest "." - run: docker rm -f website-v1 || true From dbfc32309a2788add1df20325ccc76c029711ac2 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 18:14:51 +0800 Subject: [PATCH 07/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index cacf66a..fb5a0a5 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -4,8 +4,9 @@ on: [push] jobs: Explore-Gitea-Actions: - runs-on: server + runs-on: server container: + image: ghcr.io/catthehacker/ubuntu:act-latest volumes: - /run/docker.sock:/run/docker.sock steps: From ed775da7269680b319ce65eb734fce3fb5a93d23 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 23:37:51 +0800 Subject: [PATCH 08/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index fb5a0a5..32005c3 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -5,10 +5,6 @@ on: [push] jobs: Explore-Gitea-Actions: runs-on: server - container: - image: ghcr.io/catthehacker/ubuntu:act-latest - volumes: - - /run/docker.sock:/run/docker.sock steps: - run: docker build --pull --rm -f "Dockerfile" -t website-v1:latest "." - run: docker rm -f website-v1 || true From 0d09086f7b0a7f38bc9ee49347ad046484410c60 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 23:38:25 +0800 Subject: [PATCH 09/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 32005c3..a9392f5 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -5,6 +5,9 @@ on: [push] jobs: Explore-Gitea-Actions: runs-on: server + container: + volumes: + - /run/docker.sock:/run/docker.sock steps: - run: docker build --pull --rm -f "Dockerfile" -t website-v1:latest "." - run: docker rm -f website-v1 || true From 817e17ca2387acf429112f20062fc639e491a9f3 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 23:41:25 +0800 Subject: [PATCH 10/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index a9392f5..fb5a0a5 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -6,6 +6,7 @@ jobs: Explore-Gitea-Actions: runs-on: server container: + image: ghcr.io/catthehacker/ubuntu:act-latest volumes: - /run/docker.sock:/run/docker.sock steps: From b51352db5064e5c78dea4b556e53ffe0d52f4323 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Fri, 24 May 2024 23:48:29 +0800 Subject: [PATCH 11/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index fb5a0a5..3fd6ca9 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -6,7 +6,7 @@ jobs: Explore-Gitea-Actions: runs-on: server container: - image: ghcr.io/catthehacker/ubuntu:act-latest + image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest volumes: - /run/docker.sock:/run/docker.sock steps: From 05a0807e3d8223d3de766bf9b86a30ed6ec71678 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 00:09:06 +0800 Subject: [PATCH 12/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 3fd6ca9..0fd9292 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -7,10 +7,13 @@ jobs: runs-on: server container: image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest - volumes: - - /run/docker.sock:/run/docker.sock - steps: - - run: docker build --pull --rm -f "Dockerfile" -t website-v1:latest "." + # volumes: + # - /run/docker.sock:/run/docker.sock + env: + DOCKER_ORG: gitea + DOCKER_LATEST: latest + steps: + - run: docker build -t website-v1:latest "." - run: docker rm -f website-v1 || true - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - run: docker rmi $(docker images -f "dangling=true" -q) || true From add36cc33bc423d8f669845715b665f003c5a50d Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 00:10:50 +0800 Subject: [PATCH 13/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 47 +++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 0fd9292..ecbfcf3 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -12,9 +12,44 @@ jobs: env: DOCKER_ORG: gitea DOCKER_LATEST: latest - steps: - - run: docker build -t website-v1:latest "." - - run: docker rm -f website-v1 || true - - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - - run: docker rmi $(docker images -f "dangling=true" -q) || true - - run: docker ps + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # all history for all branches and tags + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Get Meta + id: meta + run: | + echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT + echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: | + linux/amd64 + linux/arm64 + push: true + tags: | + ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} + + # - run: docker build -t website-v1:latest "." + # - run: docker rm -f website-v1 || true + # - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + # - run: docker rmi $(docker images -f "dangling=true" -q) || true + # - run: docker ps From 118e04da3b7aeedb742941bbd6936e6ec12a7ea2 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 00:37:05 +0800 Subject: [PATCH 14/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 71 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index ecbfcf3..7b25cbf 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -5,51 +5,52 @@ on: [push] jobs: Explore-Gitea-Actions: runs-on: server - container: - image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest + container: catthehacker/ubuntu:act-latest + # container: + # image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest # volumes: # - /run/docker.sock:/run/docker.sock - env: - DOCKER_ORG: gitea - DOCKER_LATEST: latest + # env: + # DOCKER_ORG: gitea + # DOCKER_LATEST: latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 # all history for all branches and tags - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 - - name: Set up Docker BuildX - uses: docker/setup-buildx-action@v3 + # - name: Set up Docker BuildX + # uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + # - name: Login to DockerHub + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} - - name: Get Meta - id: meta - run: | - echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT - echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT + # - name: Get Meta + # id: meta + # run: | + # echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT + # echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile - platforms: | - linux/amd64 - linux/arm64 - push: true - tags: | - ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} + # - name: Build and push + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: ./Dockerfile + # platforms: | + # linux/amd64 + # linux/arm64 + # push: true + # tags: | + # ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} - # - run: docker build -t website-v1:latest "." - # - run: docker rm -f website-v1 || true - # - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - # - run: docker rmi $(docker images -f "dangling=true" -q) || true - # - run: docker ps + - run: docker build -t website-v1:latest "." + - run: docker rm -f website-v1 || true + - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + - run: docker rmi $(docker images -f "dangling=true" -q) || true + - run: docker ps From d39edc65ba46bbf9450dee565435c7e2f666732a Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 00:38:37 +0800 Subject: [PATCH 15/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 7b25cbf..e62674e 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -5,9 +5,9 @@ on: [push] jobs: Explore-Gitea-Actions: runs-on: server - container: catthehacker/ubuntu:act-latest - # container: - # image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest + # container: catthehacker/ubuntu:act-latest + container: + image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest # volumes: # - /run/docker.sock:/run/docker.sock # env: From c60423e0af7061283ae3ef967f4cb0420ee841dd Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 00:40:24 +0800 Subject: [PATCH 16/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index e62674e..1f422a8 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -8,8 +8,8 @@ jobs: # container: catthehacker/ubuntu:act-latest container: image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest - # volumes: - # - /run/docker.sock:/run/docker.sock + volumes: + - /run/docker.sock:/run/docker.sock # env: # DOCKER_ORG: gitea # DOCKER_LATEST: latest From c72100847a6d8ad5d3e680ec81a5bbe59649438e Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 00:44:30 +0800 Subject: [PATCH 17/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 37 +++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 1f422a8..d94e089 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -8,16 +8,31 @@ jobs: # container: catthehacker/ubuntu:act-latest container: image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest - volumes: - - /run/docker.sock:/run/docker.sock + # volumes: + # - /run/docker.sock:/run/docker.sock # env: # DOCKER_ORG: gitea # DOCKER_LATEST: latest steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 # all history for all branches and tags + - name: Clone + run: | + rm -rf $CLONED_REPO_DIR + git clone $BARE_REPO_DIR $CLONED_REPO_DIR + + - name: Build + run: docker build -t website-v1:latest "." + + - name: Deploy + run: | + docker stop website-v1 || true + docker rm -f website-v1 || true + docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + docker rmi $(docker images -f "dangling=true" -q) || true + docker ps + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 # all history for all branches and tags # - name: Set up QEMU # uses: docker/setup-qemu-action@v3 @@ -49,8 +64,8 @@ jobs: # tags: | # ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} - - run: docker build -t website-v1:latest "." - - run: docker rm -f website-v1 || true - - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - - run: docker rmi $(docker images -f "dangling=true" -q) || true - - run: docker ps + # - run: docker build -t website-v1:latest "." + # - run: docker rm -f website-v1 || true + # - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + # - run: docker rmi $(docker images -f "dangling=true" -q) || true + # - run: docker ps From 9151ed7157126cc5ab526c6412fdd8524e84dd62 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 00:55:27 +0800 Subject: [PATCH 18/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index d94e089..055af4b 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -16,8 +16,8 @@ jobs: steps: - name: Clone run: | - rm -rf $CLONED_REPO_DIR - git clone $BARE_REPO_DIR $CLONED_REPO_DIR + rm -rf /opt/website + git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website - name: Build run: docker build -t website-v1:latest "." From 5017356c40c98727d408f4f360907fc0f8c7583b Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 01:15:05 +0800 Subject: [PATCH 19/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 055af4b..70f3e67 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -20,7 +20,9 @@ jobs: git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website - name: Build - run: docker build -t website-v1:latest "." + run: | + cd /opt/website + docker build -t website-v1:latest "." - name: Deploy run: | From 4fd4f0110446c09245c6bf66e9f2668f14bfe928 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 01:35:16 +0800 Subject: [PATCH 20/55] =?UTF-8?q?=E6=B5=8B=E8=AF=95CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..1de40ac --- /dev/null +++ b/nginx.conf @@ -0,0 +1,64 @@ +# 设置运行 Nginx 的用户 +user nginx; + +# 启动的 worker 进程数量,一般设置为 auto,Nginx 会自动根据 CPU 数量设置合适的数量 +worker_processes auto; + +# 错误日志路径和级别 +error_log /var/log/nginx/error.log warn; + +# PID 文件路径 +pid /var/run/nginx.pid; + +# 定义全局事件 +events { + # 最大连接数 + worker_connections 1024; +} + +# 定义 HTTP 服务器 +http { + # 包含 MIME 类型的文件 + include /etc/nginx/mime.types; + # 默认 MIME 类型 + default_type application/octet-stream; + + # 自定义的 Nginx 配置 + server { + # 监听的端口 + listen 80; + # 服务器名称 + server_name localhost; + + location / { + # 网站根目录,此处使用容器内的路径 + root /usr/share/nginx/html; + # 默认首页 + index index.html; + # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html + try_files $uri $uri/ /index.html; + } + + # location ^~ /api/ { + # proxy_set_header Host $host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header X-NginX-Proxy true; + # #下面两个必须设置,请求头设置为ws请求方式 + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection "upgrade"; + # proxy_pass http://192.168.41.101:28003/; + # } + + # location /api/login/ { + # # rewrite ^/wsUrl/(.*)$ /$1 break; #拦截标识去除 + # proxy_pass http://192.168.41.101:28003/; #这里是http不是ws,不用怀疑,代理的ip和port写ws访问的实际地址 + # proxy_http_version 1.1; #这里必须使用http 1.1 + # #下面两个必须设置,请求头设置为ws请求方式 + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection "upgrade"; + # } + + } +} + \ No newline at end of file From bf8d52cf5e4f67511931f707a8999973873af59a Mon Sep 17 00:00:00 2001 From: huxin <1219654535@qq.com> Date: Sat, 25 May 2024 02:53:51 +0800 Subject: [PATCH 21/55] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ef73744..cef6bc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,14 +8,15 @@ COPY . . # RUN npm config set registry https://mirrors.tuna.tsinghua.edu.cn/npm -RUN npm install -g pnpm +# RUN npm install -g pnpm # RUN pnpm config set registry https://mirrors.tuna.tsinghua.edu.cn/npm # 下载编译 -RUN pnpm i +# RUN pnpm i # RUN pnpm build -RUN pnpm generate +# RUN pnpm generate +RUN yarn # RUN yarn build -# RUN yarn generate +RUN yarn generate From 451a92218251c7a011193d97b0ed0f69da5982c4 Mon Sep 17 00:00:00 2001 From: huxin <1219654535@qq.com> Date: Sat, 25 May 2024 03:21:23 +0800 Subject: [PATCH 22/55] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index cef6bc7..6250bc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ COPY . . # RUN pnpm i # RUN pnpm build # RUN pnpm generate +RUN yarn config set registry https://registry.npmmirror.com RUN yarn # RUN yarn build RUN yarn generate From 50ec1b1439cf995f23706fd996585d49e6664c84 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 11:30:47 +0800 Subject: [PATCH 23/55] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 16 ++++++++-------- nuxt.config.ts | 20 ++++++++++---------- package.json | 10 ++++------ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6250bc3..2baa006 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,17 +7,17 @@ COPY . . # ARG env_file -# RUN npm config set registry https://mirrors.tuna.tsinghua.edu.cn/npm -# RUN npm install -g pnpm -# RUN pnpm config set registry https://mirrors.tuna.tsinghua.edu.cn/npm +RUN npm config set registry https://registry.npmmirror.com +RUN npm install -g pnpm +RUN pnpm config set registry https://registry.npmmirror.com # 下载编译 -# RUN pnpm i +RUN pnpm i # RUN pnpm build -# RUN pnpm generate -RUN yarn config set registry https://registry.npmmirror.com -RUN yarn +RUN pnpm generate +# RUN yarn config set registry https://registry.npmmirror.com +# RUN yarn # RUN yarn build -RUN yarn generate +# RUN yarn generate diff --git a/nuxt.config.ts b/nuxt.config.ts index be405f6..d194747 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -28,19 +28,19 @@ export default defineNuxtConfig({ // clientDB: true // } // }, - image: { - // provider:"static" - }, + // image: { + // // provider:"static" + // }, // optimizedImages: { // optimizeImages: true // }, - experimental: { - // when using generate, payload js assets included in sw precache manifest - // but missing on offline, disabling extraction it until fixed - payloadExtraction: false, - inlineSSRStyles: false, - renderJsonPayloads: true, - }, + // experimental: { + // // when using generate, payload js assets included in sw precache manifest + // // but missing on offline, disabling extraction it until fixed + // payloadExtraction: false, + // inlineSSRStyles: false, + // renderJsonPayloads: true, + // }, components: [{ path: '~/components', diff --git a/package.json b/package.json index 1de6527..676aa9a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "sass": "^1.62.1", "swiper": "^9.2.4", "unity-webgl": "^3.4.2", - "vue-tsc": "^1.2.0", + "vue-tsc": "^2.0.7", "vue-unity-webgl": "^1.2.0" }, "devDependencies": { @@ -28,19 +28,17 @@ "@iconify-json/carbon": "^1.1.16", "@iconify-json/twemoji": "^1.1.11", "@nuxt/content": "^2.6.0", - "@nuxt/devtools": "^0.4.0", "@nuxtjs/color-mode": "^3.2.0", - "@nuxtjs/i18n": "8.0.0-beta.11", + "@nuxtjs/i18n": "8.3.1", "@nuxtjs/strapi": "^1.9.1", "@pinia/nuxt": "^0.4.8", - "@unocss/eslint-config": "0.52.4", - "@unocss/nuxt": "0.52.4", + "@unocss/nuxt": "0.60.3", "@vite-pwa/nuxt": "^0.0.7", "@vue-macros/nuxt": "^1.2.8", "@vueuse/nuxt": "^9.13.0", "consola": "^3.0.1", "eslint": "^8.38.0", - "nuxt": "^3.4.0", + "nuxt": "^3.11.2", "pinia": "^2.0.34", "serve": "14.2.0", "typescript": "^4.9.5", From 378a5104e61f257339ed0f3e89508a852d2e4f58 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 12:13:07 +0800 Subject: [PATCH 24/55] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 15 +++++++-------- package.json | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 70f3e67..25b76a9 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -4,24 +4,23 @@ on: [push] jobs: Explore-Gitea-Actions: - runs-on: server + runs-on: ubuntu-latest # container: catthehacker/ubuntu:act-latest - container: - image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest + # container: + # image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest # volumes: # - /run/docker.sock:/run/docker.sock # env: # DOCKER_ORG: gitea # DOCKER_LATEST: latest steps: - - name: Clone - run: | - rm -rf /opt/website - git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website + # - name: Clone + # run: | + # rm -rf /opt/website + # git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website - name: Build run: | - cd /opt/website docker build -t website-v1:latest "." - name: Deploy diff --git a/package.json b/package.json index 676aa9a..24969c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "private": true, - "packageManager": "pnpm@8.2.0", "scripts": { "build": "nuxi build", "dev": "nuxi dev", From 3f14dc9843e17281606d880e1424175490430efa Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 12:34:33 +0800 Subject: [PATCH 25/55] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 25b76a9..d704dd4 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -4,7 +4,7 @@ on: [push] jobs: Explore-Gitea-Actions: - runs-on: ubuntu-latest + runs-on: linux_centos # container: catthehacker/ubuntu:act-latest # container: # image: ghcr.nju.edu.cn/catthehacker/ubuntu:act-latest @@ -19,17 +19,17 @@ jobs: # rm -rf /opt/website # git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website - - name: Build - run: | - docker build -t website-v1:latest "." + # - name: Build + # run: | + # docker build -t website-v1:latest "." - - name: Deploy - run: | - docker stop website-v1 || true - docker rm -f website-v1 || true - docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - docker rmi $(docker images -f "dangling=true" -q) || true - docker ps + # - name: Deploy + # run: | + # docker stop website-v1 || true + # docker rm -f website-v1 || true + # docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + # docker rmi $(docker images -f "dangling=true" -q) || true + # docker ps # - name: Checkout # uses: actions/checkout@v4 # with: @@ -65,8 +65,8 @@ jobs: # tags: | # ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} - # - run: docker build -t website-v1:latest "." - # - run: docker rm -f website-v1 || true - # - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - # - run: docker rmi $(docker images -f "dangling=true" -q) || true - # - run: docker ps + - run: docker build -t website-v1:latest "." + - run: docker rm -f website-v1 || true + - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + - run: docker rmi $(docker images -f "dangling=true" -q) || true + - run: docker ps From f07ce3335ec6f7bcc6f12c43874ff44475d51011 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 12:35:55 +0800 Subject: [PATCH 26/55] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 39 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index d704dd4..c229162 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -14,22 +14,23 @@ jobs: # DOCKER_ORG: gitea # DOCKER_LATEST: latest steps: - # - name: Clone - # run: | - # rm -rf /opt/website - # git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website + - name: Clone + run: | + rm -rf /opt/website + git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website - # - name: Build - # run: | - # docker build -t website-v1:latest "." + - name: Build + run: | + cd /opt/website + docker build -t website-v1:latest "." - # - name: Deploy - # run: | - # docker stop website-v1 || true - # docker rm -f website-v1 || true - # docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - # docker rmi $(docker images -f "dangling=true" -q) || true - # docker ps + - name: Deploy + run: | + docker stop website-v1 || true + docker rm -f website-v1 || true + docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + docker rmi $(docker images -f "dangling=true" -q) || true + docker ps # - name: Checkout # uses: actions/checkout@v4 # with: @@ -65,8 +66,8 @@ jobs: # tags: | # ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} - - run: docker build -t website-v1:latest "." - - run: docker rm -f website-v1 || true - - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 - - run: docker rmi $(docker images -f "dangling=true" -q) || true - - run: docker ps + # - run: docker build -t website-v1:latest "." + # - run: docker rm -f website-v1 || true + # - run: docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 + # - run: docker rmi $(docker images -f "dangling=true" -q) || true + # - run: docker ps From c52d62a435170ab4c72d184b2a2c269545e55688 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 12:44:19 +0800 Subject: [PATCH 27/55] CI --- .gitea/workflows/action.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index c229162..9a59b61 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -14,23 +14,23 @@ jobs: # DOCKER_ORG: gitea # DOCKER_LATEST: latest steps: - - name: Clone + - name: Build & Deploy run: | - rm -rf /opt/website - git clone http://www.topverse.world:3000/huxin/TOPVERSE_Official /opt/website - - - name: Build - run: | - cd /opt/website + cd /opt/website/TOPVERSE_Official + git pull docker build -t website-v1:latest "." - - - name: Deploy - run: | docker stop website-v1 || true docker rm -f website-v1 || true docker run -d -p 19555:80 --restart=unless-stopped --name website-v1 website-v1 docker rmi $(docker images -f "dangling=true" -q) || true docker ps + + # - name: Build + # run: + + # - name: Deploy + # run: | + # - name: Checkout # uses: actions/checkout@v4 # with: From c64ee39d50eea6f9fa428e10e300ef0718fd06da Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 12:47:08 +0800 Subject: [PATCH 28/55] CI --- .gitea/workflows/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 9a59b61..3ee0fc3 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -16,7 +16,7 @@ jobs: steps: - name: Build & Deploy run: | - cd /opt/website/TOPVERSE_Official + cd /opt/workspace/TOPVERSE_Official git pull docker build -t website-v1:latest "." docker stop website-v1 || true From 89021eec8935fe8ef882d78d9e876ec5016a9aa0 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 12:56:14 +0800 Subject: [PATCH 29/55] CI --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2baa006..676bca9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN npm install -g pnpm RUN pnpm config set registry https://registry.npmmirror.com # 下载编译 RUN pnpm i -# RUN pnpm build +RUN pnpm build RUN pnpm generate # RUN yarn config set registry https://registry.npmmirror.com # RUN yarn From b8e271774134117a71bff589d999b3f2257fb908 Mon Sep 17 00:00:00 2001 From: AaronHux Date: Sat, 25 May 2024 14:39:34 +0800 Subject: [PATCH 30/55] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc | 9 ------ .vscode/settings.json | 46 +++++++++++++++++++++++++++++ components/Footer.vue | 2 +- components/header/mobile-nav.vue | 2 +- components/section/GradientCard.vue | 2 +- eslint.config.mjs | 6 ++++ nuxt.config.ts | 4 +-- package.json | 33 ++++++++++----------- pages/community/vamx/index.vue | 6 ++-- pages/community/vamx/join.vue | 4 +-- pages/community/vamx/news.vue | 2 +- pages/community/vamx/structure.vue | 4 +-- pages/index.vue | 12 ++++---- pages/release/index.vue | 6 ++-- pages/solutions.vue | 2 +- pages/solutions/aigc.vue | 4 +-- pages/solutions/digital-twin.vue | 4 +-- pages/solutions/mixed-reality.vue | 4 +-- pages/solutions/web3.vue | 4 +-- uno.config.ts | 10 +++---- 20 files changed, 103 insertions(+), 63 deletions(-) delete mode 100644 .eslintrc create mode 100644 eslint.config.mjs diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index fde5836..0000000 --- a/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": [ - "@antfu", - "@unocss" - ], - "rules": { - "@typescript-eslint/ban-ts-comment":"off" - } -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 7839ae1..06bf150 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,51 @@ "typescript.tsdk": "node_modules/typescript/lib", "i18n-ally.localesPaths": [ "locales" + ], + // Enable the ESlint flat config support + // (remove this if your ESLint extension above v3.0.5) + "eslint.experimental.useFlatConfig": true, + + // Disable the default formatter, use eslint instead + "prettier.enable": false, + "editor.formatOnSave": false, + + // Auto fix + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + + // Silent the stylistic rules in you IDE, but still auto fix them + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off" }, + { "rule": "format/*", "severity": "off" }, + { "rule": "*-indent", "severity": "off" }, + { "rule": "*-spacing", "severity": "off" }, + { "rule": "*-spaces", "severity": "off" }, + { "rule": "*-order", "severity": "off" }, + { "rule": "*-dangle", "severity": "off" }, + { "rule": "*-newline", "severity": "off" }, + { "rule": "*quotes", "severity": "off" }, + { "rule": "*semi", "severity": "off" } + ], + + // Enable eslint for all supported languages + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml", + "toml", + "xml", + "gql", + "graphql", + "astro" ] } diff --git a/components/Footer.vue b/components/Footer.vue index 89447dc..1fa5cab 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -6,7 +6,7 @@ const footer = useFoot()