Skip to content

Commit 73e3385

Browse files
authored
Update README.md
1 parent 70f5223 commit 73e3385

File tree

1 file changed

+58
-25
lines changed

1 file changed

+58
-25
lines changed

README.md

Lines changed: 58 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
[VuePress](https://vuepress.vuejs.org/zh/)
2121

22-
[SamKirkland / FTP-Deploy-Action](https://github.com/marketplace/actions/ftp-deploy)
22+
[wlixcc/SFTP-Deploy-Action](https://github.com/wlixcc/SFTP-Deploy-Action)
2323

2424
## 最终效果
2525

@@ -39,7 +39,7 @@
3939

4040
- Github Actions
4141

42-
- SamKirkland / FTP-Deploy-Action
42+
- wlixcc/SFTP-Deploy-Action
4343

4444
### 相关
4545

@@ -53,11 +53,9 @@
5353

5454
通过 GitHub 操作 可直接在仓库中构建端到端持续集成 (CI) 和持续部署 (CD) 功能。
5555

56-
- SamKirkland / FTP-Deploy-Action:
57-
58-
Automate deploying websites and more with this GitHub action
56+
- wlixcc/SFTP-Deploy-Action:
5957

60-
通过 GitHub action 自动部署网页等操作
58+
Deploy files to server use GitHub actions & SFTP
6159

6260
## 博客主题配置
6361

@@ -145,7 +143,7 @@ module.exports = {
145143
// host: "0.0.0.0", // 生成网页地址(本地调试使用)
146144
// port: "22333", // 生成网页端口(本地调试使用)
147145
title: "Tsanfer's Blog", // 显示在左上角的网页名称以及首页在浏览器标签显示的title名称
148-
description: "现居住于猎户臂上的一个碳基生命", // meta 中的描述文字,用于SEO
146+
description: "网络空间无限宽广", // meta 中的描述文字,用于SEO
149147
head: [
150148
["link", { rel: "icon", href: "/favicon.svg" }], //浏览器的标签栏的网页图标,基地址/docs/.vuepress/public
151149
[
@@ -155,6 +153,9 @@ module.exports = {
155153
content: "width=device-width,initial-scale=1,user-scalable=no",
156154
},
157155
], //在移动端,搜索框在获得焦点时会放大
156+
[
157+
'script async defer', {src: 'http://learn.tsanfer.com:8080/api/application/embed?protocol=http&host=learn.tsanfer.com:8080&token=f077a5ae0d9136e0'}
158+
]
158159
],
159160
theme: "reco", //选择主题‘reco’
160161
themeConfig: {
@@ -172,7 +173,7 @@ module.exports = {
172173
socialLinks: [
173174
{ icon: "reco-github", link: "https://github.com/Tsanfer" },
174175
{ icon: "reco-bilibili", link: "https://space.bilibili.com/12167681" },
175-
{ icon: "reco-qq", link: "tencent://message/?uin=1124851454" },
176+
{ icon: "reco-douban", link: "https://www.douban.com/people/219819109" },
176177
{ icon: "reco-twitter", link: "https://twitter.com/a1124851454" },
177178
{ icon: "reco-mail", link: "mailto:a1124851454@gmail.com" },
178179
],
@@ -187,17 +188,22 @@ module.exports = {
187188
{
188189
text: "个人网盘",
189190
link: "http://clouddisk.tsanfer.com:8080",
190-
icon: "fa-hdd",
191+
icon: "fa-hard-drive",
191192
},
192193
{
193194
text: "订阅转换器",
194195
link: "http://clouddisk.tsanfer.com:58080",
195-
icon: "fa-exchange-alt",
196+
icon: "fa-right-left",
196197
},
197198
{
198199
text: "目标检测",
199200
link: "http://hpc.tsanfer.com:8000",
200-
icon: "fa-object-ungroup",
201+
icon: "fa-solid fa-object-ungroup",
202+
},
203+
{
204+
text: "在线 XM 音乐播放器",
205+
link: "http://clouddisk.tsanfer.com:8081",
206+
icon: "fa-robot",
201207
},
202208
],
203209
},
@@ -220,6 +226,15 @@ module.exports = {
220226
link: "https://space.bilibili.com/12167681",
221227
icon: "reco-bilibili",
222228
},
229+
{
230+
text: "豆瓣",
231+
link: "https://www.douban.com/people/219819109",
232+
icon: "reco-douban",
233+
},
234+
{
235+
text: "网易云音乐",
236+
link: "https://music.163.com/#/user/home?id=69696518",
237+
},
223238
{
224239
text: "QQ",
225240
link: "tencent://message/?uin=1124851454",
@@ -257,6 +272,7 @@ module.exports = {
257272
children: [
258273
"Linux_board_NFS",
259274
"First_Prepare_for_Lanqiao_Cup_MCU_Competition",
275+
"ESP32_Wi-Fi_schedule_HTTP(S)"
260276
],
261277
},
262278
],
@@ -267,6 +283,7 @@ module.exports = {
267283
children: [
268284
"Storage_hardware",
269285
"Windows_WSL_terminal_WebDAV_PartitionBackup",
286+
"C92_Openwrt_DNS_Swap"
270287
],
271288
},
272289
],
@@ -296,8 +313,8 @@ module.exports = {
296313
lastUpdated: "最后更新时间", // string | boolean
297314
author: "Tsanfer",
298315
authorAvatar: "/avatar.svg", //作者头像
299-
mode: "light", //默认显示白天模式
300-
codeTheme: "okaidia", // default 'tomorrow'
316+
// mode: "light", //默认显示白天模式
317+
mode: "auto", //默认显示白天模式
301318
smooth: "true", //平滑滚动
302319
// 评论设置
303320
valineConfig: {
@@ -328,28 +345,31 @@ module.exports = {
328345

329346
[SamKirkland / FTP-Deploy-Action](https://github.com/marketplace/actions/ftp-deploy)
330347

331-
```yml
348+
```yaml
332349
# .github/workflows/nodejs.yml
333350

334-
on: push # 触发此文件运行的条件
351+
on: # 触发此文件运行的条件
352+
workflow_dispatch: # 手动
353+
push: # push 时
354+
335355
name: CI/CD # 此工作流程(workflow)的名字
336356
jobs:
337357
FTP-Deploy-Action:
338358
name: CI&CD # 此任务(job)的名字
339-
runs-on: ubuntu-22.04 # 运行环境
359+
runs-on: ubuntu-24.04 # 运行环境
340360
steps:
341-
- uses: actions/checkout@v3 # 切换分支
361+
- uses: actions/checkout@v4 # 切换分支
342362
with:
343363
fetch-depth: 2
344364

345365
- name: Use Node.js 16
346-
uses: actions/setup-node@v3 # 使用node环境
366+
uses: actions/setup-node@v4 # 使用node环境
347367
with:
348368
node-version: 16 # 版本16
349369

350370
- name: Cache node modules
351371
id: cache # 缓存id
352-
uses: actions/cache@v3
372+
uses: actions/cache@v4
353373
env:
354374
cache-name: cache-node-modules # 缓存名字
355375
with:
@@ -370,14 +390,27 @@ jobs:
370390
- name: reset git
371391
run: git reset --hard
372392

373-
- name: 📂 Sync files
374-
uses: SamKirkland/FTP-Deploy-Action@4.3.3
393+
- name: Deploy with Password
394+
uses: wlixcc/SFTP-Deploy-Action@v1.2.6
375395
with:
376-
server: ${{ secrets.FTP_IP }}
377396
username: ${{ secrets.FTP_USERNAME }}
397+
server: ${{ secrets.FTP_SERVER }}
398+
port: ${{ secrets.FTP_PORT }}
399+
local_path: './docs/.vuepress/dist/*'
400+
remote_path: '/upload'
401+
sftp_only: true
378402
password: ${{ secrets.FTP_PASSWORD }}
379-
local-dir: docs/.vuepress/dist/ # 选择哪些文件要部署到服务器,这个选项在这里选了之后,要在.git-ftp-include中添加相应的路径
380-
server-dir: /
403+
rsyncArgs: '--exclude=node_modules --exclude=.git --exclude=*.log'
404+
sftpArgs: '-o ConnectTimeout=5'
405+
406+
# - name: 📂 Sync files
407+
# uses: SamKirkland/FTP-Deploy-Action@v4.3.5
408+
# with:
409+
# server: ${{ secrets.FTP_IP }}
410+
# username: ${{ secrets.FTP_USERNAME }}
411+
# password: ${{ secrets.FTP_PASSWORD }}
412+
# local-dir: docs/.vuepress/dist/ # 选择哪些文件要部署到服务器,这个选项在这里选了之后,要在.git-ftp-include中添加相应的路径
413+
# server-dir: /
381414

382415
# ftp-server: sftp://${{ secrets.FTP_IP }}/home/www/htdocs # 服务器地址和端口(可以填域名,不过我服务器做了全站加速会导向加速结点的IP,所以只能用服务器的IP)
383416
# ftp-username: ${{ secrets.FTP_USERNAME }} # FTP用户名
@@ -386,7 +419,7 @@ jobs:
386419
# local-dir: docs/.vuepress/dist/ # 选择哪些文件要部署到服务器,这个选项在这里选了之后,要在.git-ftp-include中添加相应的路径
387420

388421
- name: upload-artifact
389-
uses: actions/upload-artifact@v3 #共享或保存action过程中产生的文件
422+
uses: actions/upload-artifact@v4 #共享或保存action过程中产生的文件
390423
with:
391424
name: static_web_file
392425
path: ./docs/.vuepress/dist/ # or path/to/artifact

0 commit comments

Comments
 (0)