blog-hexo/.gitea/workflows/build.yml

37 lines
717 B
YAML
Raw Normal View History

2024-06-04 10:55:56 +08:00
name: Build Project
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
2024-06-04 11:02:02 +08:00
node-version: '18' # or specify the version you need
2024-06-04 10:55:56 +08:00
- name: Install pnpm
2024-06-04 11:03:17 +08:00
run: npm i -g pnpm hexo
2024-06-04 10:55:56 +08:00
- name: Install dependencies
run: pnpm install
- name: hexo clean
run: hexo cl
- name: hexo generate
run: hexo g
- name: build algolia search index
run: pnpm run search
- name: move dist assets
run: cp -rf public/* /www/wwwroot/caddy/html/blog-hexo/