Skip to content

Commit edd1424

Browse files
committed
Replace oldbook => newbook
1 parent da83188 commit edd1424

File tree

1,047 files changed

+102892
-200354
lines changed

Some content is hidden

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

1,047 files changed

+102892
-200354
lines changed

.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 & 44 deletions
This file was deleted.

.github/workflows/deploy_4.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: 'deploy_4'
3+
4+
on:
5+
push:
6+
branches:
7+
- 4.x
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Cloning repo
18+
uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Push to dokku
23+
uses: dokku/github-action@master
24+
with:
25+
branch: '4.x'
26+
git_remote_url: 'ssh://dokku@apps.cakephp.org:22/newbook-4'
27+
git_push_flags: '-f'
28+
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}

.github/workflows/deploy_4x.yml

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

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/stale@v8
19+
- uses: actions/stale@v10
2020
with:
2121
repo-token: ${{ secrets.GITHUB_TOKEN }}
2222
stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. Remove the `stale` label or comment or this will be closed in 15 days'

.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;"]

0 commit comments

Comments
 (0)