Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjustments to make 3.x docs deploy work #418

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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://[email protected]: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