LOG[2021-09-05]

LOG[2021-09-05]@v0 by GHOST, 1630785154004

阴间时间发文

不愧是我

配置了下源码仓库和在线编辑

上线了Vercel同步站

明早给一下实现


LOG[2021-09-05]@v1 by GHOST, 1630824855574

就当现在是上午吧

3个同步站, GitHub Actions构建时间大概在1M15S左右

还是和LOG[2021-09-01]一样

pages.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Hexo Blog CI

on:
# push:
# branches:
# - master
watch:
types: [started]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository master branch
uses: actions/checkout@master
with:
ref: # 自行填写分支

- name: Setup Node.js 16.x
uses: actions/setup-node@master
with:
node-version: "16.x"

- name: Setup Hexo Dependencies
run: |
npm install hexo-cli -g
npm install

- name: Setup Deploy Key
run: |
mkdir ~/.ssh/
cp ./.ssh/id_rsa ~/.ssh/id_rsa
cp ./.ssh/id_rsa.pub ~/.ssh/id_rsa.pub
cp ./.ssh/known_hosts ~/.ssh/known_hosts
sudo chmod 0600 ~/.ssh/id_rsa
sudo chmod 0600 ~/.ssh/id_rsa.pub
sudo chmod 0600 ~/.ssh/known_hosts

- name: Setup Git Information
run: |
git config --global user.name '' # 登录用户名
git config --global user.email '' # 登录邮箱

- name: Generate For GH
run: |
node gh-pages.js
cp "./hexo-config.yml" ./_config.yml
cp "./next-config.yml" ./themes/next/_config.yml

- name: Deploy Hexo For GH
run: |
hexo clean
hexo generate
hexo deploy

- name: Generate For CF
run: |
node cf-pages.js
cp "./hexo-config.yml" ./_config.yml
cp "./next-config.yml" ./themes/next/_config.yml

- name: Deploy Hexo For CF
run: |
hexo clean
hexo generate
hexo deploy

- name: Generate For VC
run: |
node vc-pages.js
cp "./hexo-config.yml" ./_config.yml
cp "./next-config.yml" ./themes/next/_config.yml

- name: Deploy Hexo For VC
run: |
hexo clean
hexo generate
hexo deploy

差不多就这样

EOF


诶还没完其实就是我忘写了

LOG[2021-09-05]@v2 by GHOST, 1630828005009

有这么一个东西, https://github.dev/

Github官方出品

用法也很简单

https://github.dev/user-name/repo-name/tree/branch-name/subdirectory-name/file-name

那么在next-config里添加/修改下面这条即可

1
2
3
post_edit:
enable: true
url: https://github.dev/user-name/repo-name/tree/branch-name/subdirectory-name/ # 大概就是你源码仓库里这篇文章的文件夹, 例如https://github.dev/user-name/repo-name/tree/master/source/

那么, 就这样罢