From 83163c66c8daee81c05b233bcd10eebf55e8490c Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sat, 16 Sep 2023 19:24:55 +0200 Subject: [PATCH] adjustments to make 3.x docs deploy work --- .github/workflows/deploy_docs_3x.yml | 23 +++++++++++++++++++++++ Dockerfile | 6 ++++-- README.md | 2 +- docs.Dockerfile | 2 +- docs/config/all.py | 7 ++++--- 5 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/deploy_docs_3x.yml diff --git a/.github/workflows/deploy_docs_3x.yml b/.github/workflows/deploy_docs_3x.yml new file mode 100644 index 000000000..c2dbf8cc7 --- /dev/null +++ b/.github/workflows/deploy_docs_3x.yml @@ -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 }} diff --git a/Dockerfile b/Dockerfile index 296613920..7acfb27ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \ @@ -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 diff --git a/README.md b/README.md index 3cc152bc7..a403eae02 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs.Dockerfile b/docs.Dockerfile index 4f3ca473c..eb134b0ee 100644 --- a/docs.Dockerfile +++ b/docs.Dockerfile @@ -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 diff --git a/docs/config/all.py b/docs/config/all.py index 260522630..cfeecdc20 100644 --- a/docs/config/all.py +++ b/docs/config/all.py @@ -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 = '' @@ -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.