diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f1752e9..1428d26 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,81 +17,6 @@ jobs: path: "pulp-docs" fetch-depth: 0 - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulpcore" - path: "pulpcore" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_ansible" - path: "pulp_ansible" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_container" - path: "pulp_container" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_deb" - path: "pulp_deb" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_gem" - path: "pulp_gem" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_maven" - path: "pulp_maven" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_npm" - path: "pulp_npm" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_ostree" - path: "pulp_ostree" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_python" - path: "pulp_python" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp_rpm" - path: "pulp_rpm" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp-cli" - path: "pulp-cli" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp-ui" - path: "pulp-ui" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp-openapi-generator" - path: "pulp-openapi-generator" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp-oci-images" - path: "pulp-oci-images" - - - uses: "actions/checkout@v4" - with: - repository: "pulp/pulp-operator" - path: "pulp-operator" - - name: "Set up Python" uses: "actions/setup-python@v5" with: @@ -103,5 +28,5 @@ jobs: - name: "Build docs" run: | - mkdocs build + make docs ... diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0640e06..b2db44d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,21 +9,21 @@ concurrency: jobs: docs: - uses: "./.github/workflows/docs.yml" + uses: ./.github/workflows/pulp-docs-ci.yml - tests: - uses: "./.github/workflows/tests.yml" + # tests: + # uses: "./.github/workflows/tests.yml" - ready-to-ship: - # This is a dummy dependent task to have a single entry for the branch protection rules. - runs-on: "ubuntu-latest" - needs: - - "docs" - - "tests" - if: "always()" - steps: - - name: "Collect needed jobs results" - run: | - echo '${{toJson(needs)}}' | jq -r 'to_entries[]|select(.value.result!="success")|.key + ": " + .value.result' - echo '${{toJson(needs)}}' | jq -e 'to_entries|map(select(.value.result!="success"))|length == 0' - echo "CI says: Looks good!" + # ready-to-ship: + # # This is a dummy dependent task to have a single entry for the branch protection rules. + # runs-on: "ubuntu-latest" + # needs: + # - "docs" + # - "tests" + # if: "always()" + # steps: + # - name: "Collect needed jobs results" + # run: | + # echo '${{toJson(needs)}}' | jq -r 'to_entries[]|select(.value.result!="success")|.key + ": " + .value.result' + # echo '${{toJson(needs)}}' | jq -e 'to_entries|map(select(.value.result!="success"))|length == 0' + # echo "CI says: Looks good!" diff --git a/.github/workflows/pulp-docs-ci.yml b/.github/workflows/pulp-docs-ci.yml new file mode 100644 index 0000000..2d19731 --- /dev/null +++ b/.github/workflows/pulp-docs-ci.yml @@ -0,0 +1,40 @@ +name: 'Docs CI' +on: + workflow_call: + +jobs: + build: + runs-on: ubuntu-latest + steps: + + # The caller repository and context is used + - name: Checkout CI repository + if: ${{ github.event.repository.name != 'pulp-docs' }} + uses: actions/checkout@v4 + with: + path: ${{ github.event.repository.name }} + + - name: Checkout pulp-docs repository + uses: actions/checkout@v4 + with: + repository: "pulp/pulp-docs" + path: pulp-docs + ref: "rewrite-as-mkdocs-plugin" + fetch-depth: 0 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: "Install pulp-docs" + run: | + cd pulp-docs + pip install --upgrade pip + pip install -r doc_requirements.txt + + - name: "Build Docs" + run: | + echo $PWD + cd pulp-docs + pulp-docs fetch --dest /tmp/pulp-docs-tmp + pulp-docs build --path pulp-docs@..:${{ github.event.repository.name }}@..:/tmp/pulp-docs-tmp diff --git a/Makefile b/Makefile index 222acbc..c747f5a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ docs: - mkdocs build + pulp-docs fetch --dest /tmp/pulpdocs-tmp + pulp-docs build --path pulp-docs@..:/tmp/pulpdocs-tmp .PHONY: docs