Skip to content

refactor(android/vue): 规范 store 导入并修正安卓启动图 #37

refactor(android/vue): 规范 store 导入并修正安卓启动图

refactor(android/vue): 规范 store 导入并修正安卓启动图 #37

Workflow file for this run

name: 构建 Github Pages
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: 检出代码
uses: actions/checkout@v6
- name: 设置 pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: 设置 Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
- name: 缓存 pnpm 依赖
uses: actions/cache@v5
with:
path: |
~/.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-pages-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-pages-
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 构建前端项目
run: pnpm run build
- name: 禁用 Jekyll
run: touch docs/.nojekyll
- name: 验证构建产物
run: |
if [ ! -d "docs" ]; then
echo "构建失败:docs 目录不存在"
exit 1
fi
if [ ! -f "docs/index.html" ]; then
echo "构建失败:docs/index.html 不存在"
exit 1
fi
echo "构建产物验证通过"
ls -la docs/
- name: 配置 Github Pages
uses: actions/configure-pages@v5
- name: 上传构建版
uses: actions/upload-pages-artifact@v4
with:
path: './docs'
- name: 部署到 GitHub Pages
id: deployment
uses: actions/deploy-pages@v4