๐Ÿš€ Shivam Gupta

July 30, 2026 ยท View on GitHub

Shivam Gupta Portfolio

๐Ÿš€ Shivam Gupta โ€” Portfolio

Personal portfolio built with Next.js, hosted on GitHub Pages.

Next.js GitHub Pages


๐Ÿ“– About

Hi, I'm Shivam Gupta โ€” a Full Stack Developer passionate about building fast, scalable, and modern web applications. This is the source code for my personal portfolio site.

๐Ÿ”— Live site: the-shivam-gupta.github.io


๐Ÿ›  Tech Stack

TechnologyPurpose
Next.js 14React framework with App Router
React 18UI library
SassSCSS styling
GitHub PagesStatic hosting
GitHub ActionsCI/CD deployment

๐Ÿšฆ Running Locally

git clone https://github.com/the-shivam-gupta/the-shivam-gupta.github.io.git
cd the-shivam-gupta.github.io
npm install
npm run dev

Open http://localhost:3000 in your browser.


๐Ÿ“ฆ Build for Production

npm run build

Static files are output to the out/ directory, ready for deployment.


๐ŸŒ Deploy to GitHub Pages

This repo is pre-configured to deploy to GitHub Pages automatically via GitHub Actions. Follow these steps to deploy your own Next.js site:

1. Configure Next.js for Static Export

In next.config.js, add:

const nextConfig = {
  output: 'export',
  images: { unoptimized: true },
};

output: 'export' generates static HTML files in out/ instead of requiring a Node server.
images.unoptimized disables the Next.js image optimization API (not supported on static hosts).

2. Set Up GitHub Actions

Create .github/workflows/deploy.yml:

name: Deploy to GitHub Pages

on:
  push:
    branches: [main]

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: pages
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm
      - run: npm ci
      - run: npm run build
      - uses: actions/upload-pages-artifact@v3
        with:
          path: ./out

  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - id: deployment
        uses: actions/deploy-pages@v4

3. Enable GitHub Pages in Repository Settings

  1. Go to your repo Settings โ†’ Pages
  2. Under Source, select GitHub Actions
  3. Push any commit to main to trigger the workflow

The action will build the site and deploy it. You can monitor progress in the Actions tab.

4. Done ๐ŸŽ‰

Your site will be live at https://<username>.github.io/ (or https://<username>.github.io/<repo>/ for project sites).


๐Ÿ“ Project Structure

.
โ”œโ”€โ”€ .github/workflows/deploy.yml   # CI/CD pipeline
โ”œโ”€โ”€ public/                         # Static assets (images, fonts, PDFs)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/                        # Next.js App Router pages
โ”‚   โ”‚   โ”œโ”€โ”€ page.js                 # Home page
โ”‚   โ”‚   โ”œโ”€โ”€ layout.js               # Root layout
โ”‚   โ”‚   โ””โ”€โ”€ resume/page.js          # Resume page
โ”‚   โ”œโ”€โ”€ components/                 # React components
โ”‚   โ”œโ”€โ”€ lib/                        # Utility libraries
โ”‚   โ””โ”€โ”€ scss/                       # SCSS stylesheets
โ”œโ”€โ”€ next.config.js                  # Next.js configuration
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

โญ If you found this useful, consider giving it a star!

Built with โค๏ธ by Shivam Gupta