-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (37 loc) · 1.07 KB
/
travis.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
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Hexo
run: npm install hexo-cli -g
- name: Install dependencies
run: npm install
- name: Configure Git
env:
U_NAME: ${{ secrets.U_NAME }}
U_EMAIL: ${{ secrets.U_EMAIL }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git config --global user.name "${{ secrets.U_NAME }}"
git config --global user.email "${{ secrets.U_EMAIL }}"
- name: Replace GitHub token in _config.yml
run: |
sed -i "s/github_token/${{ secrets.GH_TOKEN }}/g" _config.yml || exit 1
- name: Clean and generate Hexo
run: |
hexo clean
hexo generate
- name: Deploy to GitHub Pages
run: hexo deploy
# Add additional jobs or steps as needed