Skip to content

fix: 修改主页部分样式 #45

fix: 修改主页部分样式

fix: 修改主页部分样式 #45

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
# 添加 Next.js 缓存配置
- name: Cache Next.js build
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-nextjs-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Build project
run: |
pnpm install
pnpm build
- name: Sync search index
run: |
pnpm run sync-search
- name: Generate sitemap
run: |
pnpm run generate-sitemap
env:
ORAMA_PRIVATE_API_KEY: ${{ secrets.ORAMA_PRIVATE_API_KEY }}
- name: Add CNAME
run: |
echo "mx-space.js.org" > out/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: out
env:
CI: true