Deploy Resume / deploy (push) Failing after 36s
- 数据分层:base/experiences(事实) + companies(企业维度) + roles(岗位维度) + variants(变体覆盖),Handlebars 模板构建生成 4 份 HTML + 4 份纯文本 + 导航页
- 路由:根路由导航页(默认推荐 私企-全栈),/private/{dev,support}、/soe/{dev,support},旧地址 301 兼容
- 支持/交付岗不改写经历 bullet(与私企-dev 逐字一致),仅专业技能适配
- 移除 CSDN 与文档站链接
- 样式拆分 base + theme-private/theme-soe,打印样式去底色、条目不跨页
- Docker 多阶段构建(node 构建 → nginx 托管),新增 check.mjs 自检与 serve.mjs 本地预览
- 删除旧手写简历(resume/soe/other/txt)与重复样式
31 lines
795 B
Docker
31 lines
795 B
Docker
# ---- 构建阶段:由 data/ + templates/ 生成静态站点 ----
|
||
FROM node:20-alpine AS build
|
||
WORKDIR /app
|
||
|
||
# 跳过 Playwright 浏览器下载(构建无需浏览器)
|
||
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
||
|
||
# 国内镜像安装依赖(CI runner 在阿里云)
|
||
RUN npm install -g pnpm@11 --registry=https://registry.npmmirror.com
|
||
|
||
COPY package.json pnpm-lock.yaml .npmrc ./
|
||
RUN pnpm install --frozen-lockfile
|
||
|
||
COPY . .
|
||
RUN node scripts/build.mjs && node scripts/check.mjs
|
||
|
||
# ---- 运行阶段:Nginx 托管 dist/ ----
|
||
FROM nginx:alpine
|
||
|
||
# 复制 Nginx 配置
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||
|
||
# 复制构建产物(HTML + txt + css + img)
|
||
COPY --from=build /app/dist/ /usr/share/nginx/html/
|
||
|
||
# 暴露端口
|
||
EXPOSE 80
|
||
|
||
# 启动 Nginx
|
||
CMD ["nginx", "-g", "daemon off;"]
|