浏览代码

:pencil: more detailed readme and drone setup

tags/0.9.0
j 5 年前
父节点
当前提交
9be62ef542
共有 2 个文件被更改,包括 20 次插入8 次删除
  1. 10
    2
      .drone.yml
  2. 10
    6
      README.md

+ 10
- 2
.drone.yml 查看文件

@@ -1,4 +1,11 @@
1 1
 ---
2
+################
3
+#    SECRETS   #
4
+################
5
+
6
+# push_deploy_key: id_rsa from DRONE host machine
7
+
8
+
2 9
 ################
3 10
 # Build & Test #
4 11
 ################
@@ -57,15 +64,16 @@ trigger:
57 64
     - success
58 65
 
59 66
 steps:
60
-# Test the vue theme
67
+# post-receive hook
61 68
 - name: push commit
62
-  image: appleboy/drone-git-push
69
+  image: appleboy/drone-git-push:0.2.0-linux-amd64
63 70
   settings:
64 71
     branch: master
65 72
     remote: maeda@143.110.234.41:/opt/staging/vue-wp.git
66 73
     remote_name: staging
67 74
     force: true
68 75
     ssh_key:
76
+      # !: id_rsa from DRONE machine
69 77
       from_secret: push_deploy_key
70 78
 
71 79
 volumes:

+ 10
- 6
README.md 查看文件

@@ -90,13 +90,17 @@ IS_DEV=false
90 90
 
91 91
 Lastly set your directory owner to `www-data` with `docker exec -it vue-wp chown -R www-data:www-data ./wp-content`
92 92
 
93
-:robot: Drone CI/CD
94
--------------------
95 93
 
96
-We use Drone for automated testing and deployment.
94
+:robot: CI/CD
95
+-------------
96
+
97
+Included is a drone config, and some recommended steps to build. 
97 98
 
98
-To get automated builds working...
99
+* You MUST activate the pipeline
100
+* Add the `id_rsa` of the drone host to appropriate key in the pipeline secrets under the name `push_deploy_key`
99 101
 
100
-You MUST add your *private* `id_rsa` to the pipeline secrets under the name `push_deploy_key`
102
+You also need to setup a `post-receive` hook on the host server.
101 103
 
102
-You MUST have the `post-receive` hook running correctly
104
+* On your *development* machine, add the target host as a remote `git remote add </opt/staging/js-vue.git> staging master`
105
+* Login to the *remote* machine and setup a bare git repo on `git init --bare </opt/staging/js-vue.git>`
106
+* Copy the `post-receive` hook file into the `</opt/staging/js-vue.git/hooks/>` directory

正在加载...
取消
保存