Skip to content

Commit d3f5d0d

Browse files
committed
Replace oldbook => newbook
1 parent b386efa commit d3f5d0d

1,025 files changed

Lines changed: 96445 additions & 203677 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.exrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/deploy_5.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
2-
name: 'deploy_5.x'
2+
name: 'deploy_5'
33

44
on:
55
push:
66
branches:
7-
- 5.x
7+
- 5.next
88
workflow_dispatch:
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}
12-
cancel-in-progress: ${{ github.ref != 'refs/heads/5.next' }}
1312

1413
jobs:
1514
deploy:
1615
runs-on: ubuntu-latest
1716
steps:
1817
- name: Cloning repo
19-
uses: actions/checkout@v6
18+
uses: actions/checkout@v5
2019
with:
2120
fetch-depth: 0
2221

2322
- name: Push to dokku
2423
uses: dokku/github-action@master
2524
with:
26-
git_remote_url: 'ssh://dokku@apps.cakephp.org:22/book-5'
25+
branch: '5.next'
26+
git_remote_url: 'ssh://dokku@apps.cakephp.org:22/newbook-5next'
2727
git_push_flags: '-f'
2828
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}

.github/workflows/deploy_5next.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# Project specific files #
22
##########################
3-
*.pyc
4-
/build
5-
*/_build/*
3+
.vitepress/dist
4+
.vitepress/cache
5+
.vitepress/.temp
6+
/node_modules/
7+
.temp/
68

79
# IDE and editor specific files #
810
#################################
911
/nbproject
1012
.idea
1113
.project
1214
.vscode
15+
.zed
1316

1417
# OS generated files #
1518
######################

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,51 @@
1-
FROM debian:bookworm
1+
# ----------------------
2+
# 1. Build stage
3+
# ----------------------
4+
FROM node:22-alpine AS builder
25

3-
ENV DEBIAN_FRONTEND=noninteractive
6+
# Install git and rsync
7+
RUN apk add --no-cache git rsync
48

5-
LABEL Description="This image is used to create an environment to contribute to the cakephp/docs"
9+
WORKDIR /app
610

7-
RUN apt-get update && apt-get install -y \
8-
build-essential \
9-
latexmk \
10-
php \
11-
python3-full \
12-
texlive-fonts-recommended \
13-
texlive-lang-all \
14-
texlive-latex-extra \
15-
texlive-latex-recommended \
16-
&& apt-get clean \
17-
&& rm -rf /var/lib/apt/lists/*
11+
# Bust cache by fetching latest commit info
12+
ADD https://api.github.com/repos/cakephp/docs-skeleton/git/refs/heads/main /tmp/cache-bust.json
1813

19-
RUN python3 -m venv /tmp/venv
20-
ENV PATH="/tmp/venv/bin:$PATH"
14+
# Clone cakephp-docs-skeleton into vitepress directory
15+
RUN git clone --depth 1 https://github.com/cakephp/docs-skeleton.git vitepress
2116

22-
COPY requirements.txt /tmp/
23-
RUN pip install -r /tmp/requirements.txt
17+
# Copy documentation and config files into the skeleton
18+
# Use rsync to merge docs instead of replacing to preserve shared public assets
19+
RUN --mount=type=bind,source=docs,target=/tmp/docs \
20+
rsync -av /tmp/docs/ vitepress/docs/
2421

25-
WORKDIR /data
26-
VOLUME "/data"
22+
COPY config.js vitepress/config.js
23+
COPY toc_en.json vitepress/toc_en.json
24+
COPY toc_ja.json vitepress/toc_ja.json
2725

28-
CMD ["/bin/bash"]
26+
# Install vitepress deps
27+
WORKDIR /app/vitepress
28+
RUN npm install
29+
30+
# Increase max-old-space-size to avoid memory issues during build
31+
ENV NODE_OPTIONS="--max-old-space-size=8192"
32+
33+
# Build VitePress site
34+
RUN npm run docs:build
35+
36+
# ----------------------
37+
# 2. Runtime stage (nginx)
38+
# ----------------------
39+
FROM nginx:1.27-alpine AS runner
40+
41+
# Copy built files
42+
COPY --from=builder /app/vitepress/.vitepress/dist /usr/share/nginx/html
43+
44+
# Expose port
45+
EXPOSE 80
46+
47+
# Health check (optional)
48+
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:80/ || exit 1
49+
50+
# Start nginx
51+
CMD ["nginx", "-g", "daemon off;"]

ISSUE_TEMPLATE.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)