From 2a643e593207b3ff3885e9aad342a6767f929281 Mon Sep 17 00:00:00 2001 From: Sabertaz Date: Sat, 4 Sep 2021 02:30:03 +0800 Subject: [PATCH] build(CI): remove redundant stage --- .github/workflows/ci.yml | 54 +++++----------------------------------- 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63736e7..aa63669 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,18 +9,9 @@ on: - main jobs: - build: - name: Node ${{ matrix.node-version }} - ${{ matrix.architecture }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - node-version: - - 16 - architecture: - - x64 - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + deploy: + name: Deployment + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 @@ -30,44 +21,15 @@ jobs: - name: Setup Node environment uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} - architecture: ${{ matrix.architecture }} + node-version: 16 + architecture: x64 registry-url: https://registry.npmjs.org/ cache: 'npm' - name: Installation run: npm ci - name: Building work run: | - npm run lint --if-present - npm run build --if-present - npm run test --if-present - - name: Archive production artifacts - uses: actions/upload-artifact@v2 - with: - name: dist - path: build - # - name: NPM audit - # uses: oke-py/npm-audit-action@v1 - # with: - # audit_level: moderate - # github_token: ${{ secrets.GITHUB_TOKEN }} - # issue_assignees: sabertazimi - # issue_labels: vulnerability,test - # dedupe_issues: true - - deploy: - runs-on: ubuntu-latest - name: Deployment - needs: build - steps: - - name: Download production artifacts - uses: actions/download-artifact@v2 - with: - name: dist - path: build - - name: List production artifacts - run: ls -R - working-directory: . + npm run build - name: Deploy to Github Pages uses: peaceiris/actions-gh-pages@v3 if: ${{ github.ref == 'refs/heads/main' }} @@ -78,7 +40,3 @@ jobs: user_name: 'github-actions[bot]' user_email: 'github-actions[bot]@users.noreply.github.com' commit_message: ${{ github.event.head_commit.message }} - # - run: npm publish - # env: - # NODE_AUTH_TOKEN: ${{secrets.npm_token}} -