Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file rename #2

Merged
merged 4 commits into from
Feb 25, 2025
Merged
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
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Deploy Portfolio Site

on:
push:
branches:
- main # Runs when pushing to the 'main' branch
pull_request:
branches:
- main # Runs when creating a PR against 'main'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2 # Check out the code from the repository

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '22.14.0' # Specify your Node.js version

- name: Install pnpm
run: npm install -g pnpm # Install pnpm globally

- name: Install Dependencies
run: pnpm install # Use pnpm to install dependencies

# - name: Run Tests (Optional)
# run: pnpm test

- name: Build Project
run: pnpm run build # Build the Next.js app with pnpm

deploy:
runs-on: ubuntu-latest
needs: build # Ensure that the deploy step only runs after the build

steps:
- name: Install Vercel CLI
run: npm install -g vercel # Install Vercel CLI globally

- name: Deploy to Vercel
if: github.event_name == 'push' && github.ref == 'refs/heads/main' # Only deploy on push to 'main'
run: vercel --prod --token ${{ secrets.VERCEL_TOKEN }} --yes # Deploy to Vercel with auto-confirmation
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Vercel token from GitHub Secrets