| 123456789101112131415161718192021222324252627282930313233343536 |
- ---
- name: 'build-npm'
- description: builds the static dashboard files for the app
- inputs:
- env_vars:
- description: 'frontend env vars from Github action variables'
- runs:
- using: 'composite'
- steps:
- - name: Setup Node
- uses: actions/setup-node@v3
- with:
- node-version: 20
- - name: Install NPM Dependencies
- shell: bash
- run: |
- cd dashboard
- npm i --legacy-peer-deps
- - name: Set Environment Variables
- shell: bash
- run: |
- touch dashboard/.env
- echo '${{ inputs.env_vars }}' > dashboard/.env
- - name: Run NPM Build
- shell: bash
- run: |
- cd dashboard
- npm run build
- - name: Store NPM Static Files
- uses: actions/upload-artifact@v3
- with:
- name: npm-static-files
- path: dashboard/build/
- retention-days: 1
|