build.yml 802 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: "Build BetterYTM"
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. branches: [main]
  6. push:
  7. branches: [main]
  8. jobs:
  9. build:
  10. name: Build
  11. runs-on: ubuntu-latest
  12. timeout-minutes: 5
  13. strategy:
  14. matrix:
  15. node-version: [20.x]
  16. env:
  17. CI: "true"
  18. steps:
  19. - uses: actions/checkout@v3
  20. - name: Set up Node.js v${{ matrix.node-version }}
  21. uses: actions/setup-node@v3
  22. with:
  23. node-version: ${{ matrix.node-version }}
  24. - name: Install dependencies # runs the npm ci command to install from package-lock.json
  25. run: npm ci
  26. - name: Build all for production
  27. run: npm run build-prod
  28. - name: Upload artifacts
  29. uses: actions/upload-artifact@v2
  30. with:
  31. name: dist
  32. path: dist