Browse Source

Add SFTP sync module and config

James Peret 3 years ago
parent
commit
cb06437363
4 changed files with 138 additions and 2 deletions
  1. 9 1
      _config.yml
  2. 127 0
      package-lock.json
  3. 1 0
      package.json
  4. 1 1
      readme.md

+ 9 - 1
_config.yml

@@ -89,6 +89,7 @@ pagination_dir: page
 include:
 exclude:
 ignore:
+  - "/archives"
 
 # Extensions
 ## Plugins: https://hexo.io/plugins/
@@ -100,7 +101,14 @@ theme: james-theme
 # Deployment
 ## Docs: https://hexo.io/docs/deployment.html
 deploy:
-  type: ''
+  type: sftp
+  host: 162.243.124.54
+  port: 22
+  user: admin
+  pass: SuperUnicorn2048
+  remotePath: /var/www/jamesperet-website-2020/public_html/
+  forceUpload: false
+  concurrency: 4
 
 links:
   - icon: twitter

+ 127 - 0
package-lock.json

@@ -9,6 +9,33 @@
       "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
       "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
     },
+    "@types/minimatch": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
+      "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
+    },
+    "@types/node": {
+      "version": "9.6.56",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.56.tgz",
+      "integrity": "sha512-Cq4pUCsBL6H7X0HFAOap75lmQqcnSmUDSP0R03lz9UsxRvBu5QsnKLLgIoitlFBX+j6LmciWYQAbOSmGMi7vwA=="
+    },
+    "@types/ssh2": {
+      "version": "0.5.43",
+      "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-0.5.43.tgz",
+      "integrity": "sha512-rVEwm6fEmy9RJg1nTK3qhCKoviKtLg+axE1RXzAWuKz3QuZIZDxCKP38/tzhxkQ8I8FDVXgRoWtvltzQKtDaBg==",
+      "requires": {
+        "@types/node": "*",
+        "@types/ssh2-streams": "*"
+      }
+    },
+    "@types/ssh2-streams": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/@types/ssh2-streams/-/ssh2-streams-0.1.7.tgz",
+      "integrity": "sha512-cQNV72C+BOG7G8WNGarTQdB2Ii37cJlWatSpx5zTYxtI2ZvUt2lbq6Nc2XZ4kbge28V7Xe5KYYr82d96/rDMnQ==",
+      "requires": {
+        "@types/node": "*"
+      }
+    },
     "JSONStream": {
       "version": "1.3.5",
       "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
@@ -1176,6 +1203,14 @@
         "safe-json-stringify": "~1"
       }
     },
+    "hexo-deployer-sftp": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/hexo-deployer-sftp/-/hexo-deployer-sftp-0.4.1.tgz",
+      "integrity": "sha512-Ve72oEbLCHteGCMZVZU4p8EwDnC5tLqdAE4DpbHr9XVIJ2hTjIX/wobeGrKSScrcEn9aCteePTfKMF67wWlTMA==",
+      "requires": {
+        "sftp-sync-deploy": "^0.8.0"
+      }
+    },
     "hexo-front-matter": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/hexo-front-matter/-/hexo-front-matter-1.0.0.tgz",
@@ -2324,6 +2359,14 @@
       "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
       "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
     },
+    "queue": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/queue/-/queue-5.0.1.tgz",
+      "integrity": "sha512-c3KGXGbjY5KMHfemu1HN57Fz/7ECA4TPgCJ3u0io25z2vBpgppHo5SQOkScDRU5iXP4HWE7hKk+Cteb6+p/wew==",
+      "requires": {
+        "inherits": "~2.0.3"
+      }
+    },
     "ramda": {
       "version": "0.27.0",
       "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.0.tgz",
@@ -2597,6 +2640,67 @@
       "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
       "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
     },
+    "sftp-sync-deploy": {
+      "version": "0.8.0",
+      "resolved": "https://registry.npmjs.org/sftp-sync-deploy/-/sftp-sync-deploy-0.8.0.tgz",
+      "integrity": "sha512-EVB3lcUrp9wYnCGc6Xi5X+/AxdO7H8I8jWM+wKpPVgRlqIxX7pLYXp9Q6J68uXUrm0OJFBPf4xhLdFtW/6DEug==",
+      "requires": {
+        "@types/minimatch": "^3.0.3",
+        "@types/node": "^9.4.1",
+        "@types/ssh2": "^0.5.33",
+        "@types/ssh2-streams": "^0.1.2",
+        "chalk": "^2.3.0",
+        "minimatch": "^3.0.3",
+        "queue": "^5.0.0",
+        "ssh2": "^0.5.4"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
     "sharp": {
       "version": "0.23.4",
       "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.23.4.tgz",
@@ -2688,6 +2792,24 @@
       "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
       "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
     },
+    "ssh2": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-0.5.5.tgz",
+      "integrity": "sha1-x3gezS7OcwSiU89iD6taXCK7IjU=",
+      "requires": {
+        "ssh2-streams": "~0.1.18"
+      }
+    },
+    "ssh2-streams": {
+      "version": "0.1.20",
+      "resolved": "https://registry.npmjs.org/ssh2-streams/-/ssh2-streams-0.1.20.tgz",
+      "integrity": "sha1-URGNFUVV31Rp7h9n4M8efoosDjo=",
+      "requires": {
+        "asn1": "~0.2.0",
+        "semver": "^5.1.0",
+        "streamsearch": "~0.1.2"
+      }
+    },
     "sshpk": {
       "version": "1.16.1",
       "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
@@ -2714,6 +2836,11 @@
       "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
       "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
     },
+    "streamsearch": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
+      "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo="
+    },
     "string-width": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",

+ 1 - 0
package.json

@@ -14,6 +14,7 @@
   "dependencies": {
     "chalk": "^4.1.0",
     "hexo": "^4.2.1",
+    "hexo-deployer-sftp": "^0.4.1",
     "hexo-generator-archive": "^1.0.0",
     "hexo-generator-category": "^1.0.0",
     "hexo-generator-feed": "^2.2.0",

+ 1 - 1
readme.md

@@ -50,7 +50,7 @@ Based on [Hexo](http://hexo.io) for building the static website.
   
   - [ ] redirect to jamesperet.j1x.co
   
-  - [ ] **video link test requirement**
+  - [x] **video link test requirement**
   
   - [ ] SEO basics