Personal-Site/.drone.yml

60 lines
1.0 KiB
YAML
Raw Normal View History

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
settings:
host: 192.168.10.5
username: thomas
password:
from_secret: ssh_password
port: 22
path: /var/cache/drone
restore: true
mount:
- node_modules
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
settings:
host: 192.168.10.5
username: thomas
password:
from_secret: ssh_password
port: 22
path: /var/cache/drone
rebuild: true
mount:
- node_modules
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:09:51 -04:00
- mv dist/* dist/.* .
- rmdir dist