Skip to content

Commit

Permalink
adjustments to make 3.x docs deploy work
Browse files Browse the repository at this point in the history
  • Loading branch information
LordSimal committed Sep 16, 2023
1 parent ceb5415 commit 53f3eab
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy_docs_3x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'deploy_docs_3x'

on:
push:
branches:
- 3.x

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/chronos-docs-3'
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion 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 php:7.3
FROM php:8.1

WORKDIR /code

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Like instances of `Chronos`, `ChronosDate` objects are also *immutable*.

# Documentation

A more descriptive documentation can be found at [book.cakephp.org/chronos/2/en/](https://book.cakephp.org/chronos/2/en/).
A more descriptive documentation can be found at [book.cakephp.org/chronos/3/en/](https://book.cakephp.org/chronos/3/en/).

# API Documentation

Expand Down
2 changes: 1 addition & 1 deletion docs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FROM ghcr.io/cakephp/docs-builder:runtime as runtime

ENV LANGS="en fr ja pt"
ENV SEARCH_SOURCE="/usr/share/nginx/html"
ENV SEARCH_URL_PREFIX="/chronos/2"
ENV SEARCH_URL_PREFIX="/chronos/3"

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 = '2.x'
release = '3.x'

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

# 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': '1.x', 'number': '/chronos/1', 'title': '1.x'},
{'name': '2.x', 'number': '/chronos/2', 'title': '2.x', 'current': True},
{'name': '2.x', 'number': '/chronos/2', 'title': '2.x'},
{'name': '3.x', 'number': '/chronos/3', 'title': '3.x', 'current': True},
]

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

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

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

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

0 comments on commit 53f3eab

Please sign in to comment.