Skip to content

Commit

Permalink
ci: add build workflow
Browse files Browse the repository at this point in the history
- Added a new build workflow for the application.
- Updated the package name in `package.json` to align with project conventions.
- Removed the `predeploy` script as it is no longer required in the build process.
  • Loading branch information
Fingertips18 committed Jan 18, 2025
1 parent 48022e2 commit b7d045e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"homepage": "https://fingertips18.github.io",
"name": "fingertips18.github.io",
"name": "portfolio",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist",
"dev": "vite",
"build": "tsc && vite build",
Expand Down

0 comments on commit b7d045e

Please sign in to comment.