Skip to content

Commit

Permalink
build(CI): remove redundant stage
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi authored Sep 3, 2021
1 parent bccf603 commit 2a643e5
Showing 1 changed file with 6 additions and 48 deletions.
54 changes: 6 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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' }}
Expand All @@ -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}}

0 comments on commit 2a643e5

Please sign in to comment.