2024-06-04 10:55:56 +08:00
|
|
|
name: Build Project
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-06-04 13:11:42 +08:00
|
|
|
runs-on: ubuntu-latest
|
2024-06-04 13:17:39 +08:00
|
|
|
container:
|
|
|
|
image: node:18
|
|
|
|
options: --volume /www/wwwroot/caddy/html/:/public
|
2024-06-04 10:55:56 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2024-06-04 13:17:39 +08:00
|
|
|
- name: Install pnpm
|
|
|
|
run: npm i -g pnpm hexo
|
2024-06-04 10:55:56 +08:00
|
|
|
|
2024-06-04 13:17:39 +08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
2024-06-04 10:55:56 +08:00
|
|
|
|
2024-06-04 13:17:39 +08:00
|
|
|
- name: hexo clean
|
|
|
|
run: hexo cl
|
2024-06-04 10:55:56 +08:00
|
|
|
|
2024-06-04 13:17:39 +08:00
|
|
|
- name: hexo generate
|
|
|
|
run: hexo g
|
2024-06-04 10:55:56 +08:00
|
|
|
|
2024-06-04 13:17:39 +08:00
|
|
|
- name: build algolia search index
|
|
|
|
run: pnpm run search
|