From 2a6e4d9780a2df2e9d70dbdc4101e0210be9c94c Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 11 Nov 2025 10:47:56 +0100 Subject: [PATCH 1/3] Use reusable documentation workflow and disable old docs workflow --- .github/workflows/docs.yaml | 136 ++++++++++++++++---------------- .github/workflows/docs.yaml.bak | 67 ++++++++++++++++ .github/workflows/new-docs.yml | 37 +++++++++ 3 files changed, 174 insertions(+), 66 deletions(-) create mode 100644 .github/workflows/docs.yaml.bak create mode 100644 .github/workflows/new-docs.yml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 839665080..2e66d0624 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,67 +1,71 @@ +# Original docs workflow disabled in favor of new-docs.yml +# This file is kept only for reference. The active workflow is .github/workflows/new-docs.yml +# Backup of the original content: .github/workflows/docs.yaml.bak -name: "Documentation" - -on: - pull_request_target: - types: [opened, closed, synchronize] - paths: - - 'doc/**' - - '.github/workflows/docs.yaml' - - 'README.md' - push: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "*_actions" - paths: - - 'doc/**' - - '.github/workflows/docs.yaml' - - 'README.md' - -permissions: - contents: read - -jobs: - docs: - name: "Generate docs Pimcore Docs Generator" - runs-on: "ubuntu-latest" - steps: - - name: "Checkout code" - uses: "actions/checkout@v4" - - - name: "Checkout Docs Generator" - uses: "actions/checkout@v4" - with: - repository: "pimcore/docs-generator" - ref: "main" - path: "./docs-generator" - token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} - - - name: "Install Node" - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - registry-url: 'https://registry.npmjs.org' - - - name: Prepare Docs - working-directory: "./docs-generator" - run: | - mkdir docs - # copy docs to working directory - cp -r ../doc ./docs/ - - # copy readme to working directory - cp -r ../README.md ./docs/ - - # copy index page - cp bin/resources/00_index_empty.md ./docs/00_index.md - - # use special docusaurus config (to exclude search plugin) and check for broken links - mv docusaurus.config.js.repos-tests docusaurus.config.js - - - name: Build Docs - working-directory: "./docs-generator" - run: | - npm install - npm run build - +# +# name: "Documentation" +# +# on: +# pull_request_target: +# types: [opened, closed, synchronize] +# paths: +# - 'doc/**' +# - '.github/workflows/docs.yaml' +# - 'README.md' +# push: +# branches: +# - "[0-9]+.[0-9]+" +# - "[0-9]+.x" +# - "*_actions" +# paths: +# - 'doc/**' +# - '.github/workflows/docs.yaml' +# - 'README.md' +# +# permissions: +# contents: read +# +# jobs: +# docs: +# name: "Generate docs Pimcore Docs Generator" +# runs-on: "ubuntu-latest" +# steps: +# - name: "Checkout code" +# uses: "actions/checkout@v4" +# +# - name: "Checkout Docs Generator" +# uses: "actions/checkout@v4" +# with: +# repository: "pimcore/docs-generator" +# ref: "main" +# path: "./docs-generator" +# token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} +# +# - name: "Install Node" +# uses: actions/setup-node@v4 +# with: +# node-version: 'lts/*' +# registry-url: 'https://registry.npmjs.org' +# +# - name: Prepare Docs +# working-directory: "./docs-generator" +# run: | +# mkdir docs +# # copy docs to working directory +# cp -r ../doc ./docs/ +# +# # copy readme to working directory +# cp -r ../README.md ./docs/ +# +# # copy index page +# cp bin/resources/00_index_empty.md ./docs/00_index.md +# +# # use special docusaurus config (to exclude search plugin) and check for broken links +# mv docusaurus.config.js.repos-tests docusaurus.config.js +# +# - name: Build Docs +# working-directory: "./docs-generator" +# run: | +# npm install +# npm run build +# diff --git a/.github/workflows/docs.yaml.bak b/.github/workflows/docs.yaml.bak new file mode 100644 index 000000000..839665080 --- /dev/null +++ b/.github/workflows/docs.yaml.bak @@ -0,0 +1,67 @@ + +name: "Documentation" + +on: + pull_request_target: + types: [opened, closed, synchronize] + paths: + - 'doc/**' + - '.github/workflows/docs.yaml' + - 'README.md' + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "*_actions" + paths: + - 'doc/**' + - '.github/workflows/docs.yaml' + - 'README.md' + +permissions: + contents: read + +jobs: + docs: + name: "Generate docs Pimcore Docs Generator" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout code" + uses: "actions/checkout@v4" + + - name: "Checkout Docs Generator" + uses: "actions/checkout@v4" + with: + repository: "pimcore/docs-generator" + ref: "main" + path: "./docs-generator" + token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} + + - name: "Install Node" + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + registry-url: 'https://registry.npmjs.org' + + - name: Prepare Docs + working-directory: "./docs-generator" + run: | + mkdir docs + # copy docs to working directory + cp -r ../doc ./docs/ + + # copy readme to working directory + cp -r ../README.md ./docs/ + + # copy index page + cp bin/resources/00_index_empty.md ./docs/00_index.md + + # use special docusaurus config (to exclude search plugin) and check for broken links + mv docusaurus.config.js.repos-tests docusaurus.config.js + + - name: Build Docs + working-directory: "./docs-generator" + run: | + npm install + npm run build + diff --git a/.github/workflows/new-docs.yml b/.github/workflows/new-docs.yml new file mode 100644 index 000000000..77ff9a8eb --- /dev/null +++ b/.github/workflows/new-docs.yml @@ -0,0 +1,37 @@ +name: "Documentation (Reusable)" + +on: + pull_request_target: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "reusable-workflows" + paths: + - "doc/**" + - ".github/workflows/docs.yaml" + - ".github/workflows/docs.yml" + - ".github/workflows/new-docs.yml" + - "README.md" + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "*_actions" + - "reusable-workflows" + paths: + - "doc/**" + - ".github/workflows/docs.yaml" + - ".github/workflows/docs.yml" + - ".github/workflows/new-docs.yml" + - "README.md" + +permissions: + contents: read + +jobs: + docs: + uses: pimcore/workflows-collection-public/.github/workflows/reusable-docs.yaml@reusable-workflows + with: + docs_path: "doc" + secrets: + DOCS_GENERATOR_ACCESS_TOKEN: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} From 37848e0ae74d778c1c11e709ef5bb3a415d79a5a Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 11 Nov 2025 10:53:00 +0100 Subject: [PATCH 2/3] Remove docs workflow backup files --- .github/workflows/docs.yaml.bak | 67 --------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 .github/workflows/docs.yaml.bak diff --git a/.github/workflows/docs.yaml.bak b/.github/workflows/docs.yaml.bak deleted file mode 100644 index 839665080..000000000 --- a/.github/workflows/docs.yaml.bak +++ /dev/null @@ -1,67 +0,0 @@ - -name: "Documentation" - -on: - pull_request_target: - types: [opened, closed, synchronize] - paths: - - 'doc/**' - - '.github/workflows/docs.yaml' - - 'README.md' - push: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "*_actions" - paths: - - 'doc/**' - - '.github/workflows/docs.yaml' - - 'README.md' - -permissions: - contents: read - -jobs: - docs: - name: "Generate docs Pimcore Docs Generator" - runs-on: "ubuntu-latest" - steps: - - name: "Checkout code" - uses: "actions/checkout@v4" - - - name: "Checkout Docs Generator" - uses: "actions/checkout@v4" - with: - repository: "pimcore/docs-generator" - ref: "main" - path: "./docs-generator" - token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} - - - name: "Install Node" - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - registry-url: 'https://registry.npmjs.org' - - - name: Prepare Docs - working-directory: "./docs-generator" - run: | - mkdir docs - # copy docs to working directory - cp -r ../doc ./docs/ - - # copy readme to working directory - cp -r ../README.md ./docs/ - - # copy index page - cp bin/resources/00_index_empty.md ./docs/00_index.md - - # use special docusaurus config (to exclude search plugin) and check for broken links - mv docusaurus.config.js.repos-tests docusaurus.config.js - - - name: Build Docs - working-directory: "./docs-generator" - run: | - npm install - npm run build - From 8bbeec4c7cad4c1e925109769ec2149088f0a7f8 Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 18 Nov 2025 09:58:33 +0100 Subject: [PATCH 3/3] Rename docs.yaml to docs.yaml.bak and update new-docs.yml --- .github/workflows/{docs.yaml => docs.yaml.bak} | 0 .github/workflows/new-docs.yml | 9 ++------- 2 files changed, 2 insertions(+), 7 deletions(-) rename .github/workflows/{docs.yaml => docs.yaml.bak} (100%) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml.bak similarity index 100% rename from .github/workflows/docs.yaml rename to .github/workflows/docs.yaml.bak diff --git a/.github/workflows/new-docs.yml b/.github/workflows/new-docs.yml index 77ff9a8eb..6c98c211a 100644 --- a/.github/workflows/new-docs.yml +++ b/.github/workflows/new-docs.yml @@ -5,23 +5,18 @@ on: branches: - "[0-9]+.[0-9]+" - "[0-9]+.x" - - "reusable-workflows" + - "docs_actions" paths: - "doc/**" - - ".github/workflows/docs.yaml" - - ".github/workflows/docs.yml" - ".github/workflows/new-docs.yml" - "README.md" push: branches: - "[0-9]+.[0-9]+" - "[0-9]+.x" - - "*_actions" - - "reusable-workflows" + - "docs_actions" paths: - "doc/**" - - ".github/workflows/docs.yaml" - - ".github/workflows/docs.yml" - ".github/workflows/new-docs.yml" - "README.md"