From 16cc99baffdc8001ee0afd3dc939ffe4fc7af6e6 Mon Sep 17 00:00:00 2001 From: Katie Hughes Date: Fri, 24 May 2024 09:36:56 -0700 Subject: [PATCH] Revert "Revert "Add docs builder"" (#3924) * Revert "Revert "Add docs builder (#3920)" (#3922)" This reverts commit 76b7686562fd06d030321cc18ed0d6d6a2a91067. * Add subdirectory --- .github/CODEOWNERS | 1 + .github/workflows/co-docs-builder.yml | 31 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/co-docs-builder.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ee1ff064a7..9806375b86 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,3 +3,4 @@ # For more info, see https://help.github.com/articles/about-codeowners/ * @elastic/obs-docs +/.github/workflows/co-docs-builder.yml @elastic/docs-engineering diff --git a/.github/workflows/co-docs-builder.yml b/.github/workflows/co-docs-builder.yml new file mode 100644 index 0000000000..5f10a6329d --- /dev/null +++ b/.github/workflows/co-docs-builder.yml @@ -0,0 +1,31 @@ +name: Elastic docs + +on: + pull_request_target: + # The paths property can be omitted entirely if the repo is mainly used for docs. Leaving it in can result in builds that + # have branch protection checks in place lose the ability to merge because the workflow is not starting. If this property + # is included, please ensure that branch protection checks are disabled for the repo. + paths: + # Preface with your docs dir if you need further specificity (optional) + - 'docs/en/serverless/**.mdx' + - 'docs/en/serverless/**.docnav.json' + - 'docs/en/serverless/**.docapi.json' + - 'docs/en/serverless/**.devdocs.json' + - 'docs/en/serverless/**.jpg' + - 'docs/en/serverless/**.jpeg' + - 'docs/en/serverless/**.svg' + - 'docs/en/serverless/**.png' + - 'docs/en/serverless/**.gif' + types: [closed, opened, synchronize, labeled] + +jobs: + publish: + if: contains(github.event.pull_request.labels.*.name, 'ci:doc-build') + uses: elastic/workflows/.github/workflows/docs-elastic-co-publish.yml@main + with: + subdirectory: 'docs/en/serverless/' + secrets: + VERCEL_GITHUB_TOKEN: ${{ secrets.VERCEL_GITHUB_TOKEN_PUBLIC }} + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN_PUBLIC }} + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_PUBLIC }} + VERCEL_PROJECT_ID_DOCS_CO: ${{ secrets.VERCEL_PROJECT_ID_DOCS_CO_PUBLIC }} \ No newline at end of file