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 2.x docs deploy work #134

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
23 changes: 23 additions & 0 deletions .github/workflows/deploy_docs_2x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 'deploy_docs_2x'

on:
push:
branches:
- cake5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be cake5, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we rename the branches, then yes

workflow_dispatch:

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

- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: 'ssh://[email protected]:22/queue-docs-2'
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 @@ -45,4 +45,4 @@ Additionally, you will need to configure the ``default`` queue configuration in

## Documentation

Full documentation of the plugin can be found on the [CakePHP Cookbook](https://book.cakephp.org/queue/1/).
Full documentation of the plugin can be found on the [CakePHP Cookbook](https://book.cakephp.org/queue/2/).
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"
ENV SEARCH_SOURCE="/usr/share/nginx/html"
ENV SEARCH_URL_PREFIX="/queue/1"
ENV SEARCH_URL_PREFIX="/queue/2"

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

# The search index version.
search_version = 'queue-1'
search_version = 'queue-2'

# The marketing display name for the book.
version_name = ''
Expand All @@ -23,7 +23,8 @@

# Other versions that display in the version picker menu.
version_list = [
{'name': '1.x', 'number': '/queue/1/', 'title': '1.x', 'current': True},
{'name': '1.x', 'number': '/queue/1/', 'title': '1.x'},
{'name': '2.x', 'number': '/queue/2/', 'title': '2.x', 'current': True},
]

# Languages available.
Expand All @@ -34,7 +35,7 @@
branch = 'master'

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

show_root_link = True

Expand Down