2022-05-31 22:39:58 -04:00
|
|
|
kind: pipeline
|
|
|
|
name: buildsite
|
|
|
|
|
|
|
|
steps:
|
2022-06-03 06:09:51 -04:00
|
|
|
- name: restore_cache
|
2022-06-03 06:08:51 -04:00
|
|
|
image: appleboy/drone-sftp-cache
|
2022-06-03 06:15:50 -04:00
|
|
|
settings:
|
|
|
|
server: 192.168.10.5
|
|
|
|
port: 22
|
|
|
|
username: thomas
|
|
|
|
password:
|
|
|
|
from_secret: ssh_password
|
2022-06-03 06:20:42 -04:00
|
|
|
path: /tmp/drone
|
2022-06-03 06:15:50 -04:00
|
|
|
restore: true
|
|
|
|
mount:
|
|
|
|
- node_modules
|
2022-06-03 06:08:51 -04:00
|
|
|
|
2022-05-31 22:39:58 -04:00
|
|
|
- name: build
|
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- npm install
|
2022-06-03 05:42:33 -04:00
|
|
|
- npm run build
|
2022-06-03 06:01:55 -04:00
|
|
|
|
2022-06-03 06:10:10 -04:00
|
|
|
- name: rebuild_cache
|
2022-06-03 06:08:51 -04:00
|
|
|
image: appleboy/drone-sftp-cache
|
2022-06-03 06:15:50 -04:00
|
|
|
settings:
|
|
|
|
server: 192.168.10.5
|
|
|
|
port: 22
|
|
|
|
username: thomas
|
|
|
|
password:
|
|
|
|
from_secret: ssh_password
|
2022-06-03 06:20:42 -04:00
|
|
|
path: /tmp/drone
|
2022-06-03 06:15:50 -04:00
|
|
|
rebuild: true
|
|
|
|
mount:
|
|
|
|
- node_modules
|
2022-06-03 06:08:51 -04:00
|
|
|
|
2022-06-03 06:01:55 -04:00
|
|
|
- name: copy
|
2022-06-03 05:46:44 -04:00
|
|
|
image: appleboy/drone-scp
|
2022-06-03 05:42:33 -04:00
|
|
|
settings:
|
2022-06-03 05:46:44 -04:00
|
|
|
host: 192.168.10.5
|
2022-06-03 05:42:33 -04:00
|
|
|
username: thomas
|
|
|
|
password:
|
|
|
|
from_secret: ssh_password
|
|
|
|
port: 22
|
2022-06-03 05:46:44 -04:00
|
|
|
target: /home/thomas/wwwtest
|
2022-06-03 06:01:55 -04:00
|
|
|
source: ./dist
|
|
|
|
|
|
|
|
- name: cleanup
|
2022-06-03 06:09:51 -04:00
|
|
|
image: appleboy/drone-ssh
|
2022-06-03 06:01:55 -04:00
|
|
|
settings:
|
|
|
|
host: 192.168.10.5
|
|
|
|
username: thomas
|
|
|
|
password:
|
|
|
|
from_secret: ssh_password
|
|
|
|
port: 22
|
|
|
|
script:
|
|
|
|
- cd /home/thomas/wwwtest
|
2022-06-03 06:20:42 -04:00
|
|
|
- pwd
|
|
|
|
# - mv dist/* dist/.* .
|
|
|
|
# - rmdir dist
|