From 306ef0d69825967ff597a95a5874e3b794949381 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Mon, 2 Jun 2025 16:32:17 -0300 Subject: [PATCH] Update docs CI to use pulp-docs reusable workflow --- .github/workflows/docs.yml | 34 ------------------- .github/workflows/pr.yml | 5 ++- .../.github/workflows/pr.yml | 5 ++- .../.github/workflows/docs.yml | 34 ------------------- 4 files changed, 8 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/docs.yml delete mode 100644 cookiecutter/docs/{{ cookiecutter.__project_name }}/.github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 62b1c0577..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "Docs" - -on: - workflow_call: - -jobs: - test: - if: "endsWith(github.base_ref, 'main')" - runs-on: "ubuntu-24.04" - steps: - - uses: "actions/checkout@v4" - - uses: "actions/cache@v4" - with: - path: "~/.cache/pip" - key: "${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }}" - restore-keys: | - ${{ runner.os }}-pip- - - - name: "Set up Python" - uses: "actions/setup-python@v5" - with: - python-version: "3.13" - - name: "Install Test Dependencies" - run: | - pip install -r doc_requirements.txt - - name: "Build docs" - run: | - make docs - no-test: - if: "!endsWith(github.base_ref, 'main')" - runs-on: "ubuntu-latest" - steps: - - run: | - echo "Skip docs testing on non-main branches." diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 43f2bb6f2..c864d8035 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,10 @@ jobs: docs: needs: - "lint" - uses: "./.github/workflows/docs.yml" + # Keep the workflow tag the same as pulpdocs_ref. + uses: "pulp/pulp-docs/.github/workflows/docs-ci.yml@rewrite-as-mkdocs-plugin" + with: + pulpdocs_ref: "rewrite-as-mkdocs-plugin" codeql: needs: - "lint" diff --git a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/pr.yml b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/pr.yml index 38f6376a3..85c783159 100644 --- a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/pr.yml +++ b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/pr.yml @@ -23,7 +23,10 @@ jobs: docs: needs: - "lint" - uses: "./.github/workflows/docs.yml" + # Keep the workflow tag the same as pulpdocs_ref. + uses: "pulp/pulp-docs/.github/workflows/docs-ci.yml@rewrite-as-mkdocs-plugin" + with: + pulpdocs_ref: "rewrite-as-mkdocs-plugin" {%- endif %} codeql: needs: diff --git a/cookiecutter/docs/{{ cookiecutter.__project_name }}/.github/workflows/docs.yml b/cookiecutter/docs/{{ cookiecutter.__project_name }}/.github/workflows/docs.yml deleted file mode 100644 index 62b1c0577..000000000 --- a/cookiecutter/docs/{{ cookiecutter.__project_name }}/.github/workflows/docs.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "Docs" - -on: - workflow_call: - -jobs: - test: - if: "endsWith(github.base_ref, 'main')" - runs-on: "ubuntu-24.04" - steps: - - uses: "actions/checkout@v4" - - uses: "actions/cache@v4" - with: - path: "~/.cache/pip" - key: "${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/*constraints.lock', '**/setup.py', '**/pyproject.toml') }}" - restore-keys: | - ${{ runner.os }}-pip- - - - name: "Set up Python" - uses: "actions/setup-python@v5" - with: - python-version: "3.13" - - name: "Install Test Dependencies" - run: | - pip install -r doc_requirements.txt - - name: "Build docs" - run: | - make docs - no-test: - if: "!endsWith(github.base_ref, 'main')" - runs-on: "ubuntu-latest" - steps: - - run: | - echo "Skip docs testing on non-main branches."