Skip to content

feat: bump to v0.6.0 with savedata auto-backup and database migration… #30

feat: bump to v0.6.0 with savedata auto-backup and database migration…

feat: bump to v0.6.0 with savedata auto-backup and database migration… #30

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build frontend
run: pnpm build
# 注意:如果你的构建命令不是 pnpm build,请修改为实际使用的命令
# 添加这一步以创建 CNAME 文件
- name: Create CNAME file
run: echo "reina.huoshen80.top" > dist/CNAME
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: page
clean: true
single-commit: true # 使用单个提交以避免其他文件被复制