diff --git a/.github/workflows/hexo.yml b/.github/workflows/hexo.yml index e705ebc1..de6f95dd 100644 --- a/.github/workflows/hexo.yml +++ b/.github/workflows/hexo.yml @@ -41,4 +41,5 @@ jobs: git config --global user.email "xm1994+asuri-robot@gmail.com" git config --global user.name "Asuri Robot" sed -i "s~git@github.com:Asuri-Team/Asuri-Team.github.io.git~https://${{secrets.REPO_TOKEN}}:x-oauth-basic@github.com/Asuri-Team/Asuri-Team.github.io.git~" _config.yml - npm run deploy \ No newline at end of file + sed -i "s~sftp-password-placeholder~${{secrets.RSYNC_PASSWORD}}~" _config.yml + npm run deploy diff --git a/_config.yml b/_config.yml index 48821087..1d1cb321 100644 --- a/_config.yml +++ b/_config.yml @@ -79,6 +79,11 @@ skip_render: # Deployment ## Docs: https://hexo.io/docs/deployment.html deploy: - type: git +- type: git repo: git@github.com:Asuri-Team/Asuri-Team.github.io.git branch: master +- type: 'sftp' + host: summershrimp.com + user: hexo-deployer + pass: sftp-password-placeholder + remotePath: /opt/asuri-blog diff --git a/package-lock.json b/package-lock.json index ae1f02ad..b5a19d73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,33 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmmirror.com/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" + }, + "@types/node": { + "version": "9.6.61", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-9.6.61.tgz", + "integrity": "sha512-/aKAdg5c8n468cYLy2eQrcR5k6chlbNwZNGUj3TboyPa2hcO2QAJcfymlqPzMiRj8B6nYKXjzQz36minFE0RwQ==" + }, + "@types/ssh2": { + "version": "0.5.52", + "resolved": "https://registry.npmmirror.com/@types/ssh2/-/ssh2-0.5.52.tgz", + "integrity": "sha512-lbLLlXxdCZOSJMCInKH2+9V/77ET2J6NPQHpFI0kda61Dd1KglJs+fPQBchizmzYSOJBgdTajhPqBO1xxLywvg==", + "requires": { + "@types/node": "*", + "@types/ssh2-streams": "*" + } + }, + "@types/ssh2-streams": { + "version": "0.1.9", + "resolved": "https://registry.npmmirror.com/@types/ssh2-streams/-/ssh2-streams-0.1.9.tgz", + "integrity": "sha512-I2J9jKqfmvXLR5GomDiCoHrEJ58hAOmFrekfFqmCFd+A6gaEStvWnPykoWUwld1PNg4G5ag1LwdA+Lz1doRJqg==", + "requires": { + "@types/node": "*" + } + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npm.taobao.org/JSONStream/download/JSONStream-1.3.5.tgz", @@ -110,6 +137,14 @@ "resolved": "https://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", @@ -1172,6 +1207,14 @@ } } }, + "hexo-deployer-sftp": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/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": "2.0.0", "resolved": "https://registry.npm.taobao.org/hexo-front-matter/download/hexo-front-matter-2.0.0.tgz", @@ -2477,6 +2520,14 @@ "resolved": "https://registry.npm.taobao.org/punycode.js/download/punycode.js-2.1.0.tgz", "integrity": "sha1-85N/epFBUsLcF+nCgKLPhqJrfNo=" }, + "queue": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/queue/-/queue-5.0.1.tgz", + "integrity": "sha512-c3KGXGbjY5KMHfemu1HN57Fz/7ECA4TPgCJ3u0io25z2vBpgppHo5SQOkScDRU5iXP4HWE7hKk+Cteb6+p/wew==", + "requires": { + "inherits": "~2.0.3" + } + }, "randomatic": { "version": "3.1.1", "resolved": "https://registry.npm.taobao.org/randomatic/download/randomatic-3.1.1.tgz", @@ -2708,6 +2759,72 @@ "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz", "integrity": "sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=" }, + "sftp-sync-deploy": { + "version": "0.8.0", + "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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.npmmirror.com/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz", @@ -2853,6 +2970,31 @@ "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "ssh2": { + "version": "0.5.5", + "resolved": "https://registry.npmmirror.com/ssh2/-/ssh2-0.5.5.tgz", + "integrity": "sha512-FF+j7szpg7oegbs6anQEgBU3S+GXvTYYGBpPuKUZd306rpsY2qHxwpaK1hc+6AIBr5uIl2gt1pYVjvdo+C67Hw==", + "requires": { + "ssh2-streams": "~0.1.18" + } + }, + "ssh2-streams": { + "version": "0.1.20", + "resolved": "https://registry.npmmirror.com/ssh2-streams/-/ssh2-streams-0.1.20.tgz", + "integrity": "sha512-uqI2NfwMXF0PgY1IWivWWlfr4Ws6wsFF5Eug/bmpyyVn/k7T2VoNfJT6ynhM0JW1NpeIZuYHOENUCLx6NFK6Jw==", + "requires": { + "asn1": "~0.2.0", + "semver": "^5.1.0", + "streamsearch": "~0.1.2" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", @@ -2877,6 +3019,11 @@ "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "streamsearch": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-0.1.2.tgz", + "integrity": "sha512-jos8u++JKm0ARcSUTAZXOVC0mSox7Bhn6sBgty73P1f3JGf7yG2clTbBNHUdde/kdvP2FESam+vM6l8jBrNxHA==" + }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz", diff --git a/package.json b/package.json index 4dae956a..5a81b642 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "hexo": "^5.2.0", "hexo-asset-image": "git+https://github.com/CodeFalling/hexo-asset-image.git", "hexo-deployer-git": "^2.1.0", + "hexo-deployer-sftp": "^0.4.1", "hexo-generator-archive": "^1.0.0", "hexo-generator-category": "^1.0.0", "hexo-generator-index": "^2.0.0",