-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbitbucket-pipelines.yml
39 lines (39 loc) · 1.14 KB
/
bitbucket-pipelines.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
image: node:18
pipelines:
branches:
master:
- step:
name: Build
caches:
- node
script:
- npm install
- npm run build
artifacts:
- dist/**
- step:
name: Remove Build Folder
script:
- ssh $USER@$SERVER "sudo rm -rf /var/www/html/videosmergenestjs/dist"
- step:
name: Add Build Folder
script:
- ssh $USER@$SERVER "sudo mkdir /var/www/html/videosmergenestjs/dist"
- step:
name: Add Folder Permission
script:
- ssh $USER@$SERVER "sudo chmod 777 /var/www/html/videosmergenestjs/dist"
- step:
name: Deploy artifacts using SCP to PROD
deployment: production
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/var/www/html/videosmergenestjs/dist'
LOCAL_PATH: 'dist/*'
- step:
name: Pm2 restart
script:
- ssh $USER@$SERVER "pm2 restart videosmergenestjs"