-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 913 Bytes
/
Copy pathdeploy.yml
File metadata and controls
41 lines (35 loc) · 913 Bytes
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
name: Hexo Deployment
on:
push:
branches:
- main # only push events on source branch trigger deployment
jobs:
hexo-deployment:
runs-on: ubuntu-latest
environment: Actions_Env
env:
TZ: Asia/Shanghai
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies & Generate static files
run: |
node -v
npm i hexo-cli -g
npm i hexo-generator-search hexo-render-pug --save
npm i
hexo clean
hexo g
# Output to branch `static` from `master`
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./public
publish_branch: hexo
personal_token: ${{ secrets.GH_TOKEN }}