diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9b2900c..b9e9ce6 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -33,8 +33,10 @@ jobs: uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v4 + - name: Install Dependencies + run: npm install # 添加这一行来安装依赖项 - name: Build Rspress - run: npm run docs:build + run: npm run docs:build - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/.github/workflows/server.yaml b/.github/workflows/server.yaml deleted file mode 100644 index c0a6389..0000000 --- a/.github/workflows/server.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Server CI - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [master] - paths: - - "apps/api/**" - pull_request: - branches: [master] - paths: - - "apps/api/**" - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - env: - DATABASE_URL: "postgresql://test:test@localhost:5432/pm" - - # Steps represent a sequence of tasks that will be executed as part of the job - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - run: yarn global add turbo - - run: npx nps prepare.ci.api - - run: npx nps build.ci.api - - run: npx nps test.ci.api diff --git a/.github/workflows/web.yaml b/.github/workflows/web.yaml deleted file mode 100644 index 3e351a3..0000000 --- a/.github/workflows/web.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Web CI - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [master] - paths: - - "apps/web/**" - pull_request: - branches: [master] - paths: - - "apps/web/**" - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Cache node modules - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - run: yarn global add turbo - - run: npx nps prepare.ci.web - - run: npx nps build.ci.web - - run: npx nps test.ci.web