Skip to content

Commit 7182636

Browse files
committed
Replace oldbook => newbook
1 parent c227c5e commit 7182636

File tree

1,217 files changed

+83446
-182460
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,217 files changed

+83446
-182460
lines changed

.dockerignore

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

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
ignore:
9+
- dependency-name: sphinx
10+
versions:
11+
- ">= 3.a"
12+
- "< 4"
13+
- package-ecosystem: github-actions
14+
directory: "/"
15+
schedule:
16+
interval: weekly
17+
open-pull-requests-limit: 10

.github/workflows/ci.yml

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

.github/workflows/deploy_2.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: 'deploy_2'
3+
4+
on:
5+
push:
6+
branches:
7+
- 2.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: '2.x'
26+
git_remote_url: 'ssh://dokku@apps.cakephp.org:22/newbook-2'
27+
git_push_flags: '-f'
28+
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}

.github/workflows/deploy_2x.yml

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

.github/workflows/stale.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
stale:
12+
13+
permissions:
14+
issues: write # for actions/stale to close stale issues
15+
pull-requests: write # for actions/stale to close stale PRs
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/stale@v10
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
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'
23+
stale-pr-message: 'This pull request is stale because it has been open 120 days with no activity. Remove the `stale` label or comment on this issue, or it will be closed in 15 days'
24+
stale-issue-label: 'stale'
25+
stale-pr-label: 'stale'
26+
days-before-stale: 120
27+
days-before-close: 15
28+
exempt-issue-labels: 'pinned'
29+
exempt-pr-labels: 'pinned'

.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
######################

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

Makefile

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

0 commit comments

Comments
 (0)