diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 28e8e74d..00000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,69 +0,0 @@ - -name: "Documentation" - -on: - pull_request: - 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@v3" - - - name: "Checkout Docs Generator" - uses: "actions/checkout@v3" - with: - repository: "pimcore/docs-generator" - ref: "main" - path: "./docs-generator" - token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} - - - name: "Install Node" - uses: actions/setup-node@v3 - with: - node-version: 19.x - 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..7435c4a5 --- /dev/null +++ b/.github/workflows/docs.yaml.bak @@ -0,0 +1,73 @@ +# 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: +# 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@v3" +# +# - name: "Checkout Docs Generator" +# uses: "actions/checkout@v3" +# with: +# repository: "pimcore/docs-generator" +# ref: "main" +# path: "./docs-generator" +# token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} +# +# - name: "Install Node" +# uses: actions/setup-node@v3 +# with: +# node-version: 19.x +# 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..6c98c211 --- /dev/null +++ b/.github/workflows/new-docs.yml @@ -0,0 +1,32 @@ +name: "Documentation (Reusable)" + +on: + pull_request_target: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "docs_actions" + paths: + - "doc/**" + - ".github/workflows/new-docs.yml" + - "README.md" + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "docs_actions" + paths: + - "doc/**" + - ".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 }} diff --git a/.github/workflows/new-poeditor-export.yml b/.github/workflows/new-poeditor-export.yml new file mode 100644 index 00000000..babb7160 --- /dev/null +++ b/.github/workflows/new-poeditor-export.yml @@ -0,0 +1,21 @@ +name: "Trigger POEditor Translations Export (Reusable)" + +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.yaml b/.github/workflows/poeditor-export.yaml.bak similarity index 100% rename from .github/workflows/poeditor-export.yaml rename to .github/workflows/poeditor-export.yaml.bak