Skip to content

Commit

Permalink
Merge pull request #941 from cakephp/3.x-docs
Browse files Browse the repository at this point in the history
adjustments to make 3.x docs deploy work
  • Loading branch information
LordSimal committed Sep 16, 2023
2 parents a908336 + 83163c6 commit 4dac39f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/deploy_docs_3x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 'deploy_docs_3x'

on:
push:
branches:
- 3.x
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: 'ssh://dokku@apps.cakephp.org:22/bake-docs-3'
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Basic docker based environment
# Necessary to trick dokku into building the documentation
# using dockerfile instead of herokuish
FROM ubuntu:17.04
FROM ubuntu:22.04

# Add basic tools
RUN apt-get update && \
Expand All @@ -13,9 +13,11 @@ RUN apt-get update && \
libffi-dev \
libssl-dev

# Prevent interactive timezone input
ENV DEBIAN_FRONTEND=noninteractive
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && \
apt-get update && \
apt-get install -y php7.2-cli php7.2-mbstring php7.2-xml php7.2-zip php7.2-intl php7.2-opcache php7.2-sqlite
apt-get install -y php8.1-cli php8.1-mbstring php8.1-xml php8.1-zip php8.1-intl php8.1-opcache php8.1-sqlite

WORKDIR /code

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ composer require --dev cakephp/bake

## Documentation

You can find the documentation for bake [on its own cookbook](https://book.cakephp.org/bake/2).
You can find the documentation for bake [on its own cookbook](https://book.cakephp.org/bake/3).

## Testing

Expand Down
2 changes: 1 addition & 1 deletion docs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM ghcr.io/cakephp/docs-builder:runtime as runtime
# Configure search index script
ENV LANGS="en es fr ja pt ru"
ENV SEARCH_SOURCE="/usr/share/nginx/html"
ENV SEARCH_URL_PREFIX="/bake/2"
ENV SEARCH_URL_PREFIX="/bake/3"

COPY --from=builder /data/docs /data/docs
COPY --from=builder /data/website /data/website
Expand Down
7 changes: 4 additions & 3 deletions docs/config/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#

# The full version, including alpha/beta/rc tags.
release = '2.x'
release = '3.x'

# The search index version.
search_version = 'bake-2'
search_version = 'bake-3'

# The marketing display name for the book.
version_name = ''
Expand All @@ -24,7 +24,8 @@
# Other versions that display in the version picker menu.
version_list = [
{'name': '1.x', 'number': '/bake/1.x', 'title': '1.x'},
{'name': '2.x', 'number': '/bake/2.x', 'title': '2.x', 'current': True},
{'name': '2.x', 'number': '/bake/2.x', 'title': '2.x'},
{'name': '3.x', 'number': '/bake/3.x', 'title': '3.x', 'current': True},
]

# Languages available.
Expand Down

0 comments on commit 4dac39f

Please sign in to comment.