The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
docs gen - add identity and steps (#62433)
Jeff Bruemmer451e90660b3d
diff --git a/.github/workflows/docs-generate-base.yml b/.github/workflows/docs-generate-base.ymlindex 3e91848679d..9d8eaa54c4c 100644--- a/.github/workflows/docs-generate-base.yml+++ b/.github/workflows/docs-generate-base.yml@@ -40,24 +40,30 @@ jobs:with:m2-cache-key: "auto-update-docs-${{ inputs.m2_cache_key_suffix }}"- - name: Generate all documentation- id: generate_docs+ - name: Generate environment variables documentation+ id: generate_env_docsrun: |- set -e+ set -e # Exit on any error# Ensure we're on the target branch for documentation generationgit checkout ${{ inputs.target_branch }}- echo "Generating documentation from branch: ${{ inputs.target_branch }}"-- echo "Generating environment variables documentation..."+ echo "Generating environment variables documentation from branch: ${{ inputs.target_branch }}"clojure -M:ee:doc environment-variables-documentation+ continue-on-error: false- echo "Generating config template..."+ - name: Generate config template documentation+ id: generate_config_docs+ run: |+ set -e # Exit on any error+ echo "Generating config template documentation..."clojure -M:ee:doc config-template+ continue-on-error: false+ - name: Generate API documentation+ id: generate_api_docs+ run: |+ set -e # Exit on any errorecho "Generating API documentation..."clojure -M:ee:doc api-documentation-- echo "All documentation generated successfully"continue-on-error: false- name: Check for changes@@ -75,6 +81,9 @@ jobs:id: commit_and_pushif: steps.check_changes.outputs.changes == 'true'run: |+ git config user.name github-actions+ git config user.email [email protected]+BRANCH_NAME="docs/auto-update-${{ inputs.target_branch }}-$(date +%Y-%m-%d-%H%M%S)"echo "Creating branch: $BRANCH_NAME"@@ -101,31 +110,36 @@ jobs:GITHUB_TOKEN: ${{ secrets.automation_token }}GH_REPO: ${{ github.repository }}run: |- # Get a better summary of changesCHANGES_SUMMARY=$(git diff --name-only HEAD~1 docs/ 2>/dev/null | head -10 | sed 's/^/- /' || echo "- No specific files detected")TOTAL_CHANGES=$(git diff --name-only HEAD~1 docs/ 2>/dev/null | wc -l || echo "0")+ BRANCH_NAME="${{ steps.commit_and_push.outputs.branch_name }}"- PR_BODY="This PR contains automatically generated documentation updates.+ echo "Creating PR with branch: $BRANCH_NAME"+ echo "Changes detected: $TOTAL_CHANGES files"++ for i in {1..3}; do+ echo "Attempt $i of 3..."+ if gh pr create \+ --base "${{ inputs.target_branch }}" \+ --head "$BRANCH_NAME" \+ --title "Auto-update documentation for ${{ inputs.target_branch }}" \+ --body "This PR contains automatically generated documentation updates.## Changes detectedThe following documentation files were updated:$CHANGES_SUMMARY$([ "$TOTAL_CHANGES" -gt 10 ] && echo "- ... and $((TOTAL_CHANGES - 10)) more files")- Please review the changes and merge if they look correct.-- ---- *This PR was automatically generated by the documentation workflow.*"+ ## Generation commands+ Documentation was generated using:+ - \`clojure -M:ee:doc environment-variables-documentation\`+ - \`clojure -M:ee:doc config-template\`+ - \`clojure -M:ee:doc api-documentation\`- echo "Attempting to create PR..."- for i in {1..3}; do- echo "Attempt $i of 3..."- if gh pr create \- --base "${{ inputs.target_branch }}" \- --head "${{ steps.commit_and_push.outputs.branch_name }}" \- --title "Auto-update documentation for ${{ inputs.target_branch }}" \- --body "$PR_BODY" \- --label "Type:Documentation,no-backport"; then+ Please review the changes and merge if they look correct." \+ --label "Type:Documentation" \+ --label "no-backport" \+ --reviewer "metabase/tech-writers"; thenecho "PR created successfully on attempt $i"breakelse@@ -139,6 +153,11 @@ jobs:fidone+ - name: Skip PR creation+ if: steps.check_changes.outputs.changes == 'false'+ run: |+ echo "No documentation changes detected, skipping PR creation"+- name: Workflow summaryif: always()run: |diff --git a/.github/workflows/docs-release-generate.yml b/.github/workflows/docs-release-generate.ymlindex 6207cbf77ce..b03cfc1ced0 100644--- a/.github/workflows/docs-release-generate.yml+++ b/.github/workflows/docs-release-generate.yml@@ -8,11 +8,9 @@ on:jobs:update-release-docs:name: Call documentation update for release branch- env:- RELEASE_BRANCH: release-x.56.xuses: ./.github/workflows/docs-generate-base.ymlwith:- target_branch: ${{ env.RELEASE_BRANCH }}+ target_branch: "release-x.56.x"m2_cache_key_suffix: "release"secrets:automation_token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}