Skip to content

Commit 8046c01

Browse files
committed
feat: BROS-3: Generate only technical info for tag docs
Parameters table, result props and sample result json — that's it. Put them into new `docs/includes/tags` directory. Workflow is partially reverted from #7446
1 parent dd55228 commit 8046c01

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed

.github/workflows/cicd_pipeline.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,22 @@ jobs:
135135
with:
136136
head_sha: ${{ github.event.pull_request.head.sha || github.event.after }}
137137

138+
build-frontend-docs:
139+
name: "Build"
140+
needs:
141+
- changed_files
142+
if: |
143+
github.event_name == 'pull_request' &&
144+
github.event.pull_request.head.repo.fork == false &&
145+
needs.changed_files.outputs.frontend == 'true' &&
146+
!startsWith(needs.changed_files.outputs.commit-message, 'ci: Build tag docs')
147+
permissions:
148+
contents: write
149+
uses: ./.github/workflows/create-tag-docs.yml
150+
with:
151+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
152+
secrets: inherit
153+
138154
build-docker:
139155
name: "Build"
140156
needs:

.github/workflows/create-tag-docs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "Build tag docs"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ref:
7+
type: string
8+
required: true
9+
workflow_dispatch:
10+
inputs:
11+
ref:
12+
description: "Ref"
13+
type: string
14+
required: true
15+
16+
env:
17+
NODE: "18"
18+
FRONTEND_MONOREPO_DIR: "web"
19+
FRONTEND_BUILD_COMMIT_MESSAGE: "ci: Build tag docs"
20+
DOCS_TARGET_DIR: "docs/includes/tags"
21+
22+
jobs:
23+
build:
24+
name: "Frontend"
25+
timeout-minutes: 15
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: hmarr/debug-action@v3.0.0
29+
30+
- name: Configure git
31+
shell: bash
32+
run: |
33+
set -xeuo pipefail
34+
git config --global user.name 'robot-ci-heartex'
35+
git config --global user.email 'robot-ci-heartex@users.noreply.github.com'
36+
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
with:
40+
token: ${{ secrets.GIT_PAT }}
41+
ref: ${{ inputs.ref }}
42+
43+
- name: Setup frontend environment
44+
uses: ./.github/actions/setup-frontend-environment
45+
with:
46+
node-version: "${{ env.NODE }}"
47+
directory: "${{ env.FRONTEND_MONOREPO_DIR }}"
48+
49+
- name: "Generate docs tags files"
50+
working-directory: "${{ env.FRONTEND_MONOREPO_DIR }}"
51+
run: yarn docs
52+
53+
- name: "Commit and Push"
54+
env:
55+
COMMIT_MESSAGE: "${{ env.FRONTEND_BUILD_COMMIT_MESSAGE }}"
56+
WORKFLOW_LINK: "Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
57+
run: |
58+
git add "${{ env.DOCS_TARGET_DIR }}" || true
59+
git status -s
60+
git commit -m "${COMMIT_MESSAGE}" -m "${WORKFLOW_LINK}" || true
61+
git push origin HEAD

web/libs/editor/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"executor": "nx:run-commands",
9191
"options": {
9292
"cwd": "libs/editor",
93-
"command": "node scripts/create-docs.js ../../../docs/source/tags"
93+
"command": "node scripts/create-docs.js ../../../docs/includes/tags"
9494
}
9595
},
9696
"extract-antd-no-reset": {

0 commit comments

Comments
 (0)