Reactjs Github操作在生成react应用程序时失败

Reactjs Github操作在生成react应用程序时失败,reactjs,github,github-actions,Reactjs,Github,Github Actions,我正在尝试使用github操作构建react应用程序 我尝试设置以下工作流。 我在谷歌上搜索,发现它的内存不足 name: Node CI on: push: branches: - master jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [10.x] steps: - uses: actions/checko

我正在尝试使用github操作构建react应用程序

我尝试设置以下工作流。 我在谷歌上搜索,发现它的内存不足

name: Node CI

on:
  push:
    branches:
    - master

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x]

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - name: npm install, build
      run: |
        npm install
        npm run build --if-present
        npm build
      env:
        CI: true

    - name: deploy to s3
      uses: jakejarvis/s3-sync-action@master
      with:
        args: --acl public-read --follow-symlinks --delete
      env:
        SOURCE_DIR: './public'
        AWS_REGION: 'us-east-1'
        AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
错误抛出像

Creating an optimized production build...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

使用节点版本到12x解决了这个问题。