action.yml 848 B

123456789101112131415161718192021222324252627282930313233343536
  1. ---
  2. name: 'build-npm'
  3. description: builds the static dashboard files for the app
  4. inputs:
  5. env_vars:
  6. description: 'frontend env vars from Github action variables'
  7. runs:
  8. using: 'composite'
  9. steps:
  10. - name: Setup Node
  11. uses: actions/setup-node@v3
  12. with:
  13. node-version: 20
  14. - name: Install NPM Dependencies
  15. shell: bash
  16. run: |
  17. cd dashboard
  18. npm i --legacy-peer-deps
  19. - name: Set Environment Variables
  20. shell: bash
  21. run: |
  22. touch dashboard/.env
  23. echo '${{ inputs.env_vars }}' > dashboard/.env
  24. - name: Run NPM Build
  25. shell: bash
  26. run: |
  27. cd dashboard
  28. npm run build
  29. - name: Store NPM Static Files
  30. uses: actions/upload-artifact@v3
  31. with:
  32. name: npm-static-files
  33. path: dashboard/build/
  34. retention-days: 1