ci.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: Node CI
  2. on: [push]
  3. jobs:
  4. build:
  5. runs-on: ${{ matrix.os }}
  6. strategy:
  7. matrix:
  8. node_version: [10.x, 12.x]
  9. os: [ubuntu-latest, windows-latest, macOS-latest]
  10. steps:
  11. - uses: actions/checkout@v1
  12. - name: Use Node.js ${{ matrix.node_version }}
  13. uses: actions/setup-node@v1
  14. with:
  15. node-version: ${{ matrix.node_version }}
  16. - run: yarn
  17. - run: yarn run lint
  18. - run: yarn run tsc
  19. - run: yarn run build
  20. - run: yarn run test:all
  21. env:
  22. CI: true
  23. PROGRESS: none
  24. NODE_ENV: test
  25. NODE_OPTIONS: --max_old_space_size=4096
  26. build-and-deploy:
  27. runs-on: ubuntu-latest
  28. if: github.event == 'push' && github.ref == 'master'
  29. steps:
  30. - name: Checkout
  31. uses: actions/checkout@master
  32. - name: Build and Deploy
  33. uses: JamesIves/github-pages-deploy-action@master
  34. env:
  35. GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
  36. BRANCH: gh-pages
  37. FOLDER: "dist/"
  38. BUILD_SCRIPT: npm install && npm run deploy