Skip to content

Commit

Permalink
Merge pull request #99 from ZhQuella/main-feat/new
Browse files Browse the repository at this point in the history
feat(feat): "调整目录结构,优化项目"
  • Loading branch information
ZhQuella authored Feb 10, 2025
2 parents df7aa35 + dcdea10 commit 90a300a
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,48 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
# 检出代码
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v2
- uses: pnpm/[email protected]

# 设置 pnpm
- name: Set up pnpm
uses: pnpm/[email protected]
with:
version: 8.6.2
- name: Install modules

# 缓存 pnpm 的 node_modules,提升构建速度
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# 安装依赖
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build

# 构建项目
- name: Build project
run: pnpm run build

# 设置 Pages
- name: Setup Pages
uses: actions/configure-pages@v4

# 检查目录存在性
- name: List build directory
run: ls -R ./sample/dist

# 上传构建产物
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist repository
path: "./sample/dist"
path: ${{ github.workspace }}/sample/dist/

# 部署到 GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v3

0 comments on commit 90a300a

Please sign in to comment.