Skip to content

ci: 更新 CI 工作流配置 #125

ci: 更新 CI 工作流配置

ci: 更新 CI 工作流配置 #125

Workflow file for this run

name: ci
on:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "yarn"
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build frontend
run: yarn build
- name: Update Algolia Index
env:
HEXO_ALGOLIA_INDEXING_KEY: ${{ secrets.HEXO_ALGOLIA_INDEXING_KEY }}
run: yarn algolia
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v5
with:
target_branch: gh-pages
build_dir: ./public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}