Skip to content

build: Fix github action #2

build: Fix github action

build: Fix github action #2

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}
# Install dependencies
- run: npm ci
# Build and output webpack stats to artifacts/webpack-stats.json
- run: npm run build
working-directory: app
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: test-artifacts
path: |
artifacts/webpack-stats.json