Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chatbot canifa
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
1
Merge Requests
1
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
Vũ Hoàng Anh
chatbot canifa
Commits
eb83b47e
Commit
eb83b47e
authored
Dec 29, 2025
by
Vũ Hoàng Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: simplify deploy using local shell commands
parent
91dd0c2e
Pipeline
#3299
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
.gitlab-ci.yml
.gitlab-ci.yml
+7
-16
No files found.
.gitlab-ci.yml
View file @
eb83b47e
...
...
@@ -3,22 +3,13 @@ stages:
deploy_to_server
:
stage
:
deploy
image
:
alpine:latest
before_script
:
-
apk add --no-cache openssh-client git
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
ssh-keyscan 172.16.2.207 >> ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
# Không dùng image vì chạy shell trực tiếp trên host
script
:
-
ssh anhvh@172.16.2.207
"
cd /home/anhvh/chatbot-canifa &&
git pull origin master &&
cd backend &&
docker compose up --build -d
"
-
echo "🚀 Bắt đầu quá trình Deploy trực tiếp trên Server...
"
-
cd /home/anhvh/chatbot-canifa
-
git pull origin master
-
cd backend
-
docker compose up --build -d
-
echo "✅ Deploy thành công!
"
only
:
-
master
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