-
Notifications
You must be signed in to change notification settings - Fork 212
38 lines (36 loc) · 1.02 KB
/
deploy.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
name: deploy
on:
push:
branches:
- master
- demo-source
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@master
with:
ref: demo-source
- name: Use Node.js
uses: actions/setup-node@master
with:
node-version: '18.x'
- name: Prepare source
run: |
npm install hexo-renderer-ejs hexo-renderer-dartsass --save
git clone -b master https://github.com/ahonn/hexo-theme-even.git themes/even
cp themes/even/_config.yml.example themes/even/_config.yml
npm install
- name: Run hexo generate
run: |
npm i -g hexo-cli
hexo generate
- name: Run hexo deploy
env:
GH_DEPLOY_TOKEN: ${{secrets.GH_DEPLOY_TOKEN}}
run: |
git config --global user.name 'ahonn'
git config --global user.email '[email protected]'
sed -i "s/<token>/${GH_DEPLOY_TOKEN}/g" ./_config.yml
hexo deploy