From ae93a8a8bf116af24a0a2f9e0fde960a8578b8da Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 11 Nov 2025 10:41:28 +0100 Subject: [PATCH 1/5] Use reusable documentation workflow and disable old docs workflow --- .github/workflows/docs.yaml | 144 ++++++++++++++++---------------- .github/workflows/docs.yaml.bak | 71 ++++++++++++++++ .github/workflows/new-docs.yml | 37 ++++++++ 3 files changed, 182 insertions(+), 70 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 3160e077..cae767e5 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,71 +1,75 @@ +# 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: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - 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" - with: - ref: ${{ github.event.pull_request.head.sha }} - - - 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: +# branches: +# - "[0-9]+.[0-9]+" +# - "[0-9]+.x" +# 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" +# with: +# ref: ${{ github.event.pull_request.head.sha }} +# +# - 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 00000000..3160e077 --- /dev/null +++ b/.github/workflows/docs.yaml.bak @@ -0,0 +1,71 @@ + +name: "Documentation" + +on: + pull_request_target: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + 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" + with: + ref: ${{ github.event.pull_request.head.sha }} + + - 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 00000000..77ff9a8e --- /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 df9e5710a08ea33c367235f7fd138f0b358c1cc3 Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 11 Nov 2025 10:52:31 +0100 Subject: [PATCH 2/5] Remove docs workflow backup files --- .github/workflows/docs.yaml.bak | 71 --------------------------------- 1 file changed, 71 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 3160e077..00000000 --- a/.github/workflows/docs.yaml.bak +++ /dev/null @@ -1,71 +0,0 @@ - -name: "Documentation" - -on: - pull_request_target: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - 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" - with: - ref: ${{ github.event.pull_request.head.sha }} - - - 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 d3132f4213a65a5a00dae321ebd4a759273f5630 Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 18 Nov 2025 09:54:32 +0100 Subject: [PATCH 3/5] 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 77ff9a8e..6c98c211 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" From a4ab4bec5accf07dbb196c1db356b79277b43a74 Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 18 Nov 2025 10:22:15 +0100 Subject: [PATCH 4/5] Add new-poeditor-export.yml and backup existing poeditor-export.yml --- .github/workflows/new-poeditor-export.yml | 20 +++++++++++++++++++ ...tor-export.yml => poeditor-export.yml.bak} | 0 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/new-poeditor-export.yml rename .github/workflows/{poeditor-export.yml => poeditor-export.yml.bak} (100%) diff --git a/.github/workflows/new-poeditor-export.yml b/.github/workflows/new-poeditor-export.yml new file mode 100644 index 00000000..da9d9fdd --- /dev/null +++ b/.github/workflows/new-poeditor-export.yml @@ -0,0 +1,20 @@ +name: "Trigger POEditor Translations Export" + +on: + workflow_dispatch: + push: + branches: + - "[0-9]+.x" + - "docs_actions" + - "main" + paths: + - "src/Resources/translations/admin.en.yml" + +permissions: + contents: read + +jobs: + poeditor: + uses: pimcore/workflows-collection-public/.github/workflows/reusable-poeditor.yaml@main + secrets: + POEDITOR_ACTION_TRIGGER_TOKEN: ${{ secrets.POEDITOR_ACTION_TRIGGER_TOKEN }} diff --git a/.github/workflows/poeditor-export.yml b/.github/workflows/poeditor-export.yml.bak similarity index 100% rename from .github/workflows/poeditor-export.yml rename to .github/workflows/poeditor-export.yml.bak From 579336083ff7e9c39ec7bf2a5b15f39fe6d821dc Mon Sep 17 00:00:00 2001 From: berfinyuksel Date: Tue, 18 Nov 2025 10:49:24 +0100 Subject: [PATCH 5/5] Update reusable POEditor workflow name and content --- .github/workflows/new-poeditor-export.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-poeditor-export.yml b/.github/workflows/new-poeditor-export.yml index da9d9fdd..babb7160 100644 --- a/.github/workflows/new-poeditor-export.yml +++ b/.github/workflows/new-poeditor-export.yml @@ -1,4 +1,4 @@ -name: "Trigger POEditor Translations Export" +name: "Trigger POEditor Translations Export (Reusable)" on: workflow_dispatch: @@ -18,3 +18,4 @@ jobs: uses: pimcore/workflows-collection-public/.github/workflows/reusable-poeditor.yaml@main secrets: POEDITOR_ACTION_TRIGGER_TOKEN: ${{ secrets.POEDITOR_ACTION_TRIGGER_TOKEN }} +