ci.yml 960 B

12345678910111213141516171819202122232425262728293031323334353637
  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. deploy:
  27. name: Deploy to GitHub Pages
  28. runs-on: ubuntu-latest
  29. if: success() && github.event == 'push' && github.ref == 'master'
  30. steps:
  31. - name: publish
  32. uses: maxheld83/ghpages@v0.2.1
  33. env:
  34. BUILD_DIR: 'dist/'
  35. GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}