Skip to content

ci: add build workflow #3

ci: add build workflow

ci: add build workflow #3

Workflow file for this run

name: Portfolio - Build
on:
pull_request:
branches:
- main
jobs:
build:
name: Build Application
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache Node Modules
uses: actions/cache@v4
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci --cache .npm --prefer-offline
- name: Run Build
run: npm run build
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist