-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1.03 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
- name: Deploy to Vercel
run: vercel --prod --token ${{ secrets.VERCEL_TOKEN }} # Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Vercel token from GitHub Secrets