File tree Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,22 @@ jobs:
135
135
with :
136
136
head_sha : ${{ github.event.pull_request.head.sha || github.event.after }}
137
137
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
+
138
154
build-docker :
139
155
name : " Build"
140
156
needs :
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 90
90
"executor" : " nx:run-commands" ,
91
91
"options" : {
92
92
"cwd" : " libs/editor" ,
93
- "command" : " node scripts/create-docs.js ../../../docs/source /tags"
93
+ "command" : " node scripts/create-docs.js ../../../docs/includes /tags"
94
94
}
95
95
},
96
96
"extract-antd-no-reset" : {
You can’t perform that action at this time.
0 commit comments