Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
upgrade-data-crawler-fe
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ThinhNC
upgrade-data-crawler-fe
Commits
d12ffae6
You need to sign in or sign up before continuing.
Commit
d12ffae6
authored
Sep 10, 2026
by
ThinhNC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: add GitLab CI/CD pipeline configuration for Vercel and update gitignore for build artifacts
parent
751a54e2
Pipeline
#53070
failed
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1 deletion
+55
-1
.gitignore
.gitignore
+5
-1
.gitlab-ci.yml
.gitlab-ci.yml
+50
-0
No files found.
.gitignore
View file @
d12ffae6
...
@@ -34,9 +34,13 @@ yarn-error.log*
...
@@ -34,9 +34,13 @@ yarn-error.log*
.env*
.env*
!.env.example
!.env.example
# vercel
# vercel
& build cache
.vercel
.vercel
.pnpm-store
# typescript
# typescript
*.tsbuildinfo
*.tsbuildinfo
next-env.d.ts
next-env.d.ts
.vercel
.env*
.gitlab-ci.yml
0 → 100644
View file @
d12ffae6
# GitLab CI/CD Pipeline for deploying Next.js to Vercel using Vercel CLI
# Reference: https://vercel.com/kb/guide/how-can-i-use-gitlab-pipelines-with-vercel
image
:
node:20-alpine
stages
:
-
deploy
variables
:
PNPM_HOME
:
"
/root/.local/share/pnpm"
PATH
:
"
$PNPM_HOME:$PATH"
before_script
:
-
npm install -g pnpm vercel
-
pnpm config set store-dir .pnpm-store
# Cache pnpm dependencies and Next.js build cache to speed up pipelines
cache
:
key
:
files
:
-
pnpm-lock.yaml
paths
:
-
.pnpm-store
-
.next/cache
# 1. Preview Deployment (Triggered on feature branches and Merge Requests)
deploy_preview
:
stage
:
deploy
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
"main"
&&
$CI_COMMIT_BRANCH
!=
"master"'
script
:
-
vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
-
vercel build --token=$VERCEL_TOKEN
-
vercel deploy --prebuilt --token=$VERCEL_TOKEN
variables
:
VERCEL_ORG_ID
:
$VERCEL_ORG_ID
VERCEL_PROJECT_ID
:
$VERCEL_PROJECT_ID
# 2. Production Deployment (Triggered only when merging into main/master)
deploy_production
:
stage
:
deploy
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"main"
||
$CI_COMMIT_BRANCH
==
"master"'
script
:
-
vercel pull --yes --environment=production --token=$VERCEL_TOKEN
-
vercel build --prod --token=$VERCEL_TOKEN
-
vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
variables
:
VERCEL_ORG_ID
:
$VERCEL_ORG_ID
VERCEL_PROJECT_ID
:
$VERCEL_PROJECT_ID
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment