Skip to content

Commit

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

on:
push:
branches:
- 4.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/migrations-docs-4'
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
4 changes: 2 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 @@ -14,7 +14,7 @@ RUN apt-get update && \
libssl-dev && \
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 &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Additionally, you will need to configure the ``default`` database configuration

## Documentation

Full documentation of the plugin can be found on the [CakePHP Cookbook](https://book.cakephp.org/migrations/3/).
Full documentation of the plugin can be found on the [CakePHP Cookbook](https://book.cakephp.org/migrations/4/).
2 changes: 1 addition & 1 deletion docs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM ghcr.io/cakephp/docs-builder:runtime as runtime

ENV LANGS="en fr ja pt ru"
ENV SEARCH_SOURCE="/usr/share/nginx/html"
ENV SEARCH_URL_PREFIX="/migrations/3"
ENV SEARCH_URL_PREFIX="/migrations/4"

COPY --from=builder /data/docs /data/docs
COPY --from=builder /data/website /data/website
Expand Down
11 changes: 6 additions & 5 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 = '3.x'
release = '4.x'

# The search index version.
search_version = 'migrations-3'
search_version = 'migrations-4'

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

# Languages available.
languages = ['en', 'fr', 'ja', 'pt', 'ru']

# The GitHub branch name for this version of the docs
# for edit links to point at.
branch = '3.x'
branch = '4.x'

# Current version being built
version = '3.x'
version = '4.x'

# Language in use for this directory.
language = 'en'
Expand Down

0 comments on commit 7c6151f

Please sign in to comment.