-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
63 lines (56 loc) · 1.38 KB
/
.drone.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
kind: pipeline
name: default
workspace:
path: /home/node/app
steps:
- name: build
image: node:20.13.0
volumes:
- name: yarncache
path: /usr/local/share/.cache/yarn
commands:
- yarn
- yarn build
environment:
CI: false
PAPAERPLANE_API_ADMIN_HEADER_NAME:
from_secret: PAPAERPLANE_API_ADMIN_HEADER_NAME
PAPAERPLANE_API_ADMIN_HEADER_VALUE:
from_secret: PAPAERPLANE_API_ADMIN_HEADER_VALUE
- name: deploy
image: alpine:3.20
volumes:
- name: webroot
path: /webroot
commands:
- mkdir -p /webroot/blog/
- rm -rf /webroot/blog/*
- cp -rf ./public/* /webroot/blog/
- name: deploy-cdn
image: node:20.13.0
commands:
- yarn deploy
environment:
AWS_ACCESS_KEY_ID:
from_secret: COS_SECRET_ID
AWS_SECRET_ACCESS_KEY:
from_secret: COS_SECRET_KEY
- name: baidu-push
image: curlimages/curl
failure: ignore
commands:
- cd ./public
- curl -s -H 'Content-Type:text/plain' --data-binary @sitemap.txt "http://data.zz.baidu.com/urls?site=https://paperplane.cc&token=$BAIDU_ZHANZHANG_TOKEN"
environment:
BAIDU_ZHANZHANG_TOKEN:
from_secret: BAIDU_ZHANZHANG_TOKEN
volumes:
- name: webroot
host:
path: /root/www
- name: yarncache
host:
path: /root/.yarncache
trigger:
branch:
- master