Skip to content

Commit c6594a3

Browse files
committed
feat(deploy): deploy to own server.
1 parent 3e8aa68 commit c6594a3

File tree

4 files changed

+156
-2
lines changed

4 files changed

+156
-2
lines changed

.github/workflows/hexo.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ jobs:
4141
git config --global user.email "[email protected]"
4242
git config --global user.name "Asuri Robot"
4343
sed -i "[email protected]:Asuri-Team/Asuri-Team.github.io.git~https://${{secrets.REPO_TOKEN}}:[email protected]/Asuri-Team/Asuri-Team.github.io.git~" _config.yml
44-
npm run deploy
44+
sed -i "s~sftp-password-placeholder~${{secrets.RSYNC_PASSWORD}}~" _config.yml
45+
npm run deploy

_config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ skip_render:
7979
# Deployment
8080
## Docs: https://hexo.io/docs/deployment.html
8181
deploy:
82-
type: git
82+
- type: git
8383
repo: [email protected]:Asuri-Team/Asuri-Team.github.io.git
8484
branch: master
85+
- type: 'sftp'
86+
host: asuri.club
87+
user: hexo-deployer
88+
pass: sftp-password-placeholder
89+
remotePath: /opt/asuri-blog

package-lock.json

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"hexo": "^5.2.0",
1616
"hexo-asset-image": "git+https://github.com/CodeFalling/hexo-asset-image.git",
1717
"hexo-deployer-git": "^2.1.0",
18+
"hexo-deployer-sftp": "^0.4.1",
1819
"hexo-generator-archive": "^1.0.0",
1920
"hexo-generator-category": "^1.0.0",
2021
"hexo-generator-index": "^2.0.0",

0 commit comments

Comments
 (0)