From a68c47c599bc3cd746c9dfbcbe3b0b2565a57f66 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Fri, 22 Mar 2024 15:38:46 -0300 Subject: [PATCH] Stale old docs publishing and update dev files [noissue] --- .ci/scripts/publish_docs.sh | 33 ------------------------------ .github/workflows/publish.yml | 5 ----- .github/workflows/publish_docs.yml | 28 ------------------------- Makefile | 2 +- doc_requirements.txt | 5 +---- 5 files changed, 2 insertions(+), 71 deletions(-) delete mode 100755 .ci/scripts/publish_docs.sh delete mode 100644 .github/workflows/publish_docs.yml diff --git a/.ci/scripts/publish_docs.sh b/.ci/scripts/publish_docs.sh deleted file mode 100755 index 0c615a5ca..000000000 --- a/.ci/scripts/publish_docs.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -set -euv - -# make sure this script runs at the repo root -cd "$(dirname "$(realpath -e "$0")")"/../.. - -REF="${1#refs/}" -REF_NAME="${REF#*/}" -REF_TYPE="${REF%%/*}" - -mkdir ~/.ssh -echo "${PULP_DOCS_KEY}" > ~/.ssh/pulp-infra -chmod 600 ~/.ssh/pulp-infra - -echo "docs.pulpproject.org,8.43.85.236 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGXG+8vjSQvnAkq33i0XWgpSrbco3rRqNZr0SfVeiqFI7RN/VznwXMioDDhc+hQtgVhd6TYBOrV07IMcKj+FAzg=" >> /home/runner/.ssh/known_hosts -chmod 644 /home/runner/.ssh/known_hosts - -eval "$(ssh-agent -s)" #start the ssh agent -ssh-add ~/.ssh/pulp-infra - -make site - -if [ "${REF_TYPE}" = "heads" ] -then - [ "${REF_NAME}" = "main" ] - # publish to docs.pulpproject.org/pulp_cli - rsync -avzh --delete-delay -f '+ en/index.html' -f'P en/*' site/ doc_builder_pulp_cli@docs.pulpproject.org:/var/www/docs.pulpproject.org/pulp_cli/ -else - [ "${REF_TYPE}" = "tags" ] - # publish to docs.pulpproject.org/pulp_cli/en/{release x.y} - rsync -avzh --delete-delay site/ doc_builder_pulp_cli@docs.pulpproject.org:/var/www/docs.pulpproject.org/pulp_cli/en/"${REF_NAME%.*}" -fi diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bc1474e16..5bcb48967 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,8 +35,3 @@ jobs: twine upload dist/* cd .. twine upload dist/* - publish-docs: - needs: - - "publish-pypi" - uses: "./.github/workflows/publish_docs.yml" - secrets: "inherit" diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml deleted file mode 100644 index 4b7ccdf87..000000000 --- a/.github/workflows/publish_docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "pulp-cli Publish Docs" - -on: - push: - branches: - - "main" - paths: - - "docs/**" - - "doc_requirements.txt" - workflow_dispatch: - workflow_call: - -jobs: - publish-docs: - name: "Publish docs" - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v4" - - name: "Set up Python" - uses: "actions/setup-python@v5" - with: - python-version: "3.11" - - name: "Run publish docs script" - env: - PULP_DOCS_KEY: "${{ secrets.PULP_DOCS_KEY }}" - run: | - pip install -r doc_requirements.txt - .ci/scripts/publish_docs.sh "${GITHUB_REF}" diff --git a/Makefile b/Makefile index 745293caf..61014bb94 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ test: | tests/cli.toml pytest -v tests servedocs: - mkdocs serve -w docs_theme -w pulp-glue/pulp_glue -w pulpcore/cli/common/generic.py + pulp-docs serve -w pulp-glue/pulp_glue -w pulpcore/cli/common/generic.py site: mkdocs build diff --git a/doc_requirements.txt b/doc_requirements.txt index 7e3d2419e..857753fad 100644 --- a/doc_requirements.txt +++ b/doc_requirements.txt @@ -1,6 +1,3 @@ -mkdocs~=1.5.3 -mkdocstrings-python~=1.9.0 -black==24.3.0 -pygments~=2.17.2 +pulp-docs @ git+https://github.com/pulp/pulp-docs@main . ./pulp-glue