Skip to content

Fixing build and adding cache. #20

Fixing build and adding cache.

Fixing build and adding cache. #20

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- olt
jobs:
build:
name: 🛠️ Build Frontend Artifact
needs:
- audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: frontend/node_modules
key: fe-node-${{ hashFiles('frontend/package-lock.json') }}
- name: Install deps
run: cd frontend && npm i
- name: Compile code
run: cd frontend && npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: frontend/build
audit:
name: 🛡️ Audit Frontend Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for vulnerabilities
run: cd frontend && npm audit --omit=dev
lint:
name: 🧼 Ensure Code Style
needs: audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: frontend/node_modules
key: fe-node-${{ hashFiles('frontend/package-lock.json') }}
- name: Install deps
run: cd frontend && npm i
- name: 😂 Lint code
run: cd frontend && npm run lint