Skip to content

chore(deps): lock file maintenance #58

chore(deps): lock file maintenance

chore(deps): lock file maintenance #58

Workflow file for this run

# 只在 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 }}