File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # workflow name
2+ name : Hexo Blog CI
3+
4+ # master branch on push, auto run
5+ on :
6+ push :
7+ branches :
8+ - master
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ # check it to your workflow can access it
16+ # from: https://github.com/actions/checkout
17+ - name : Checkout Repository master branch
18+ uses : actions/checkout@master
19+
20+ # from: https://github.com/actions/setup-node
21+ - name : Setup Node.js 12.x
22+ uses : actions/setup-node@master
23+ with :
24+ node-version : " 12.x"
25+
26+ - name : Setup Hexo Dependencies
27+ run : |
28+ npm install hexo-cli -g
29+ npm install
30+
31+ - name : Setup Deploy Private Key
32+ env :
33+ HEXO_DEPLOY_PRIVATE_KEY : ${{ secrets.mac }}
34+ run : |
35+ mkdir -p ~/.ssh/
36+ echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa
37+ chmod 600 ~/.ssh/id_rsa
38+ ssh-keyscan github.com >> ~/.ssh/known_hosts
39+
40+ - name : Setup Git Infomation
41+ run : |
42+ git config --global user.name 'xiaohutu'
43+ git config --global user.email 'shanxi.1991@gmail.com'
44+ - name : Deploy Hexo
45+ run : |
46+ hexo clean
47+ hexo generate
48+ hexo deploy
You can’t perform that action at this time.
0 commit comments