Thomas Cole
2faf99ed2d
All checks were successful
continuous-integration/drone/push Build is passing
60 lines
1.0 KiB
YAML
60 lines
1.0 KiB
YAML
kind: pipeline
|
|
name: buildsite
|
|
|
|
steps:
|
|
- name: restore_cache
|
|
image: appleboy/drone-sftp-cache
|
|
settings:
|
|
server: 192.168.10.5
|
|
port: 22
|
|
username: thomas
|
|
password:
|
|
from_secret: ssh_password
|
|
path: /var/cache/drone
|
|
restore: true
|
|
mount:
|
|
- node_modules
|
|
|
|
- name: build
|
|
image: node
|
|
commands:
|
|
- npm install
|
|
- npm run build
|
|
|
|
- name: rebuild_cache
|
|
image: appleboy/drone-sftp-cache
|
|
settings:
|
|
server: 192.168.10.5
|
|
port: 22
|
|
username: thomas
|
|
password:
|
|
from_secret: ssh_password
|
|
path: /var/cache/drone
|
|
rebuild: true
|
|
mount:
|
|
- node_modules
|
|
|
|
- name: copy
|
|
image: appleboy/drone-scp
|
|
settings:
|
|
host: 192.168.10.5
|
|
username: thomas
|
|
password:
|
|
from_secret: ssh_password
|
|
port: 22
|
|
target: /home/thomas/wwwtest
|
|
source: ./dist
|
|
|
|
- name: cleanup
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host: 192.168.10.5
|
|
username: thomas
|
|
password:
|
|
from_secret: ssh_password
|
|
port: 22
|
|
script:
|
|
- cd /home/thomas/wwwtest
|
|
- mv dist/* dist/.* .
|
|
- rmdir dist
|