name: Frontend on: workflow_call: workflow_dispatch: env: NODEJS_VERSION: '16' ENVIRONMENT: "dev" jobs: frontend: name: Build frontend runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v3 with: submodules: recursive - uses: actions/setup-node@v3 with: node-version: ${{ env.NODEJS_VERSION }} - name: Get npm cache directory id: npm-cache-dir run: | echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - uses: actions/cache@v3 id: npm-cache with: path: ${{ steps.npm-cache-dir.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Build frontends run: make frontends - name: 'Tar files to preserve file permissions' run: tar -cvf frontend.tar ENVIRONMENT.txt GIT_HASH.txt VERSION.txt frontend/dist frontend/config.json - uses: actions/upload-artifact@v3 with: name: frontend path: frontend.tar