chore(deps): lock file maintenance #58
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 只在 PR 时部署到 life 不部署到主网站 | |
| name: Deploy life Only PR | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: | |
| - master | |
| paths: | |
| - "life/**" | |
| - ".github/workflows/deploy-life.yml" | |
| - "**/package.json" | |
| - "**/pnpm-lock.yaml" | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy-life-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - uses: pnpm/[email protected] | |
| name: Install pnpm | |
| id: pnpm-install | |
| # with: # Install only pnpm with packageManager | |
| # version: 7 | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Change config | |
| run: mv ./life/.vitepress/config.ts.replace ./life/.vitepress/config.ts | |
| # 运行构建脚本 | |
| - name: Build VitePress site | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=4096 | |
| VITE_AMAP_KEY: ${{ secrets.VITE_AMAP_KEY }} | |
| run: pnpm life:build | |
| - name: Deploy to GitHub Pages | |
| uses: crazy-max/[email protected] | |
| with: | |
| repo: augusmeow/life | |
| target_branch: gh-pages | |
| build_dir: life/.vitepress/dist | |
| jekyll: false | |
| env: | |
| GH_PAT: ${{ secrets.DEPLOY_GH }} |