mirror of https://github.com/jkjoy/hugoblog.git
77 lines
2.9 KiB
YAML
77 lines
2.9 KiB
YAML
|
name: Bigfa
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main # master 更新触发
|
||
|
|
||
|
jobs:
|
||
|
build-deploy:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
with:
|
||
|
submodules: recursive
|
||
|
fetch-depth: 0
|
||
|
|
||
|
- name: Setup Hugo
|
||
|
uses: peaceiris/actions-hugo@v2
|
||
|
with:
|
||
|
hugo-version: latest
|
||
|
extended: true
|
||
|
|
||
|
- name: Build
|
||
|
run: hugo --gc --minify --cleanDestinationDir
|
||
|
|
||
|
- name: Search
|
||
|
uses: caibingcheng/hugo-algolia2@v1
|
||
|
with:
|
||
|
input: "content/zh-cn/story/**"
|
||
|
index: "bigfa"
|
||
|
apikey: ${{ secrets.ALGOLIA_WRITE_KEY }}
|
||
|
appid: "FX1CAS2SD8"
|
||
|
|
||
|
- name: Deploy
|
||
|
uses: peaceiris/actions-gh-pages@v3
|
||
|
with:
|
||
|
personal_token: ${{ secrets.Bigfa }} # personal_token 这里新建一个 https://github.com/settings/tokens
|
||
|
PUBLISH_BRANCH: gh-pages # 推送到当前 gh-pages 分支
|
||
|
PUBLISH_DIR: ./public # hugo 生成到 public 作为跟目录
|
||
|
commit_message: ${{ github.event.head_commit.message }}
|
||
|
|
||
|
- name: Build FARALLON DEMO
|
||
|
run: hugo --gc --minify --cleanDestinationDir -b https://bigfa.github.io/hugo-theme-farallon/ -t farallon
|
||
|
|
||
|
- name: Deploy Demo
|
||
|
uses: peaceiris/actions-gh-pages@v3.9.3
|
||
|
with:
|
||
|
personal_token: ${{ secrets.PERSONAL_TOKEN }}
|
||
|
external_repository: bigfa/hugo-theme-farallon
|
||
|
publish_branch: gh-pages # default: gh-pages
|
||
|
publish_dir: ./public
|
||
|
commit_message: ${{ github.event.head_commit.message }}
|
||
|
|
||
|
- name: Build notability demo
|
||
|
run: hugo --gc --minify --cleanDestinationDir -b https://bigfa.github.io/hugo-theme-notability/ -t notability
|
||
|
|
||
|
- name: Deploy notability Demo
|
||
|
uses: peaceiris/actions-gh-pages@v3.9.3
|
||
|
with:
|
||
|
personal_token: ${{ secrets.PERSONAL_TOKEN }}
|
||
|
external_repository: bigfa/hugo-theme-notability
|
||
|
publish_branch: gh-pages # default: gh-pages
|
||
|
publish_dir: ./public
|
||
|
commit_message: ${{ github.event.head_commit.message }}
|
||
|
|
||
|
- name: Build puppy demo
|
||
|
run: hugo --gc --minify --cleanDestinationDir -b https://bigfa.github.io/hugo-theme-puppy/ -t puppy
|
||
|
|
||
|
- name: Deploy puppy Demo
|
||
|
uses: peaceiris/actions-gh-pages@v3.9.3
|
||
|
with:
|
||
|
personal_token: ${{ secrets.PERSONAL_TOKEN }}
|
||
|
external_repository: bigfa/hugo-theme-puppy
|
||
|
publish_branch: gh-pages # default: gh-pages
|
||
|
publish_dir: ./public
|
||
|
commit_message: ${{ github.event.head_commit.message }}
|