Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI/CD Pipeline
name: CI/CD Pipeline -> Build and Deploy

on:
push:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/version-increment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Auto Increment Version
name: CI/CD Pipeline -> Versioning

on:
pull_request:
Expand Down Expand Up @@ -61,4 +61,5 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[![Build](https://github.com/hammayo/www-portfolio/actions/workflows/deploy.yml/badge.svg)](https://github.com/hammayo/www-portfolio/actions/workflows/deploy.yml) [![Version](https://img.shields.io/github/package-json/v/hammayo/www-portfolio)](https://github.com/hammayo/www-portfolio/releases) [![Updated](https://img.shields.io/github/last-commit/hammayo/www-portfolio?logo=github&label=last%20update)](https://github.com/hammayo/www-portfolio/commits)
[![Build](https://github.com/hammayo/hammayo.github.io/actions/workflows/deploy.yml/badge.svg)](https://github.com/hammayo/hammayo.github.io/actions/workflows/deploy.yml) [![Version](https://img.shields.io/github/package-json/v/hammayo/hammayo.github.io)](https://github.com/hammayo/hammayo.github.io/releases) [![Updated](https://img.shields.io/github/last-commit/hammayo/hammayo.github.io?logo=github&label=last%20update)](https://github.com/hammayo/hammayo.github.io/commits)

# Hammayo

>
> A modern, responsive portfolio website built with Next.js, TypeScript, and Tailwind CSS.
>
> *NOTE:* This repo will move to hammayo.github.io repo once all features are completed.
> https://hammayo.github.io/www-portfolio/
> https://hammayo.github.io/
>

## Features
Expand Down Expand Up @@ -34,8 +33,8 @@

1. Clone the repository:
```bash
git clone https://github.com/hammayo/www-portfolio.git
cd www-portfolio
git clone https://github.com/hammayo/hammayo.github.io.git
cd hammayo.github.io
```

2. Install dependencies:
Expand Down Expand Up @@ -115,8 +114,8 @@ For deployment to Vercel, connect your GitHub repository to Vercel for automatic
## 📂 Project Structure

```
www-portfolio/
├── .github/ # GitHub Actions workflows
hammayo.github.io/
├── .github/ # GitHub Actions workflows
├── .vscode/ # VS Code configuration
│ └── launch.json # Debugging configuration
├── public/ # Static assets
Expand Down Expand Up @@ -290,3 +289,4 @@ Edit the following files to customize portfolio:
- [shadcn/ui](https://ui.shadcn.com/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Framer Motion](https://www.framer.com/motion/)

2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
basePath: process.env.NODE_ENV === 'production' ? '/www-portfolio' : '',
basePath: process.env.NODE_ENV === 'production' ? '' : '',

};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hammayo-portfolio",
"version": "0.1.6",
"version": "1.0.1",
"private": true,
"scripts": {
"dev": "next dev -H 0.0.0.0 --turbopack",
Expand Down
7 changes: 4 additions & 3 deletions src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ function parseEnv() {

if (!parsed.success) {
console.error(
"❌ Invalid environment variables:",
"❌ Invalid environment variables:",
parsed.error.flatten().fieldErrors
);

// Return default values instead of throwing
return {
NODE_ENV: 'development',
GITHUB_ACTIONS: undefined,

GITHUB_REPOSITORY: undefined,
GITHUB_USERNAME: undefined,
GITHUB_ACTIONS: undefined,
GITHUB_TOKEN: undefined,
GA_MEASUREMENT_ID: undefined
};
Expand All @@ -48,5 +49,5 @@ export const env = parseEnv();
// Repository and path configurations based on environment
export const isGithubActions = Boolean(env.GITHUB_ACTIONS);
export const repo = env.GITHUB_REPOSITORY?.replace(/.*?\//, '') || '';
export const basePath = isGithubActions ? `/${repo}` : '';
export const assetPrefix = isGithubActions ? `/${repo}/` : '';
export const basePath = isGithubActions ? '' : '';
5 changes: 3 additions & 2 deletions src/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function fetchGitHubOverview(username?: string): Promise<GitHubOver
}
}

// Fetch first 2pinned repositories using GraphQL API with caching
// Fetch first 2 pinned repositories using GraphQL API with caching
export async function fetchPinnedRepositories(username?: string): Promise<GitHubRepository[]> {
const githubUser = username || env.GITHUB_USERNAME;
if (!githubUser || !env.GITHUB_TOKEN) {
Expand Down Expand Up @@ -203,7 +203,8 @@ export async function fetchPinnedRepositories(username?: string): Promise<GitHub
}
}

// Fetch all repositories with options
// Fetch all repositories with options
// TODO: Use env config instead of hardcoded values
export async function fetchAllRepositories({
username,
sort = 'updated',
Expand Down