hexo-github-action

hexo-github-action自动部署

workflow

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

name: deploying Hexo project to GitHub pages
on:
push:
branches:
- main # master 分支有 push 行为时就触发这个 action
env:
TZ: Asia/Shanghai

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 8.x
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: true

- name: Build and Deploy
uses: alberk/hexo-deploy-github-pages-action@master
env:
PERSONAL_TOKEN: ${{ secrets.HEXO_DEPLOY }} # secret 名
PUBLISH_REPOSITORY: Minpeng/Minpeng.github.io # 公共仓库,格式:GitHub 用户名/仓库名
BRANCH: gh-pages # 分支,填 gh-pages 就行
#PUBLISH_DIR: ./public # 部署 public 目录下的文件
文章目录
  1. 1. hexo-github-action自动部署
    1. 1.1. workflow
|