File tree Expand file tree Collapse file tree 3 files changed +39
-5
lines changed Expand file tree Collapse file tree 3 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 6
6
- main
7
7
paths :
8
8
- ' docs/**'
9
+ pull_request :
10
+ paths :
11
+ - ' docs/**'
9
12
release :
10
13
types : [published]
11
- workflow_dispatch :
14
+ workflow_dispatch :
12
15
13
16
permissions :
14
17
contents : read
15
18
16
19
jobs :
17
20
build-image :
18
21
runs-on : ubuntu-latest
19
- # run unless event type is pull_request
20
- if : github.event_name != 'pull_request'
21
22
steps :
22
23
- uses : actions/checkout@v3
24
+
23
25
- name : Set up QEMU
24
26
uses : docker/setup-qemu-action@v2
27
+
25
28
- name : Set up Docker Buildx
26
29
uses : docker/setup-buildx-action@v2
30
+
31
+ # Only login to Docker Hub when not in PR
27
32
- name : Login to Docker Hub
33
+ if : github.event_name != 'pull_request'
28
34
uses : docker/login-action@v2
29
35
with :
30
36
username : ${{ secrets.DOCKERHUB_USERNAME }}
31
37
password : ${{ secrets.DOCKERHUB_TOKEN }}
38
+
32
39
- name : Build and push
33
40
uses : docker/build-push-action@v4
34
41
with :
35
42
context : .
36
43
file : ./docs/Dockerfile-deploy
37
44
platforms : linux/amd64
38
- push : true
39
- tags : eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest
45
+ # Only push when not in PR
46
+ push : ${{ github.event_name != 'pull_request' }}
47
+ tags : ${{ github.event_name != 'pull_request' && 'eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest' || '' }}
Original file line number Diff line number Diff line change @@ -51,6 +51,19 @@ RUN git config --global --add safe.directory /app && \
51
51
echo "Creating version $TAG"; \
52
52
cd /app/docs && git checkout $TAG; \
53
53
echo "Checked out to tag: $TAG"; \
54
+ # Check if there is a patch for the current version in app-build
55
+ echo "Checking patch in /app-build/docs/patchs..." && \
56
+ if [ -f "/app-build/docs/patchs/fix_${TAG/v/}.patch" ]; then \
57
+ echo "Found patch for version $TAG in /app-build/docs/patchs, applying..."; \
58
+ cd /app && \
59
+ git apply "/app-build/docs/patchs/fix_${TAG/v/}.patch" && \
60
+ echo "Patch applied successfully" || \
61
+ echo "Failed to apply patch for $TAG"; \
62
+ echo "Current sidebars.js content:"; \
63
+ cat /app/docs/sidebars.js; \
64
+ else \
65
+ echo "No patch found for $TAG in /app-build/docs/patchs"; \
66
+ fi; \
54
67
# Copy the necessary files to the build directory for each tag
55
68
rm -rf /app-build/docs/docs /app-build/docs/sidebars.js /app-build/docs/static /app-build/docs/src && \
56
69
cp -r /app/docs/docs /app-build/docs/ && \
Original file line number Diff line number Diff line change
1
+ diff --git a/docs/sidebars.js b/docs/sidebars.js
2
+ index e95be6d2..561bc8f7 100755
3
+ --- a/docs/sidebars.js
4
+ +++ b/docs/sidebars.js
5
+ @@ -186,7 +186,7 @@ const sidebars = {
6
+ id: "awel/awel_tutorial/advanced_guide/4.1_lifecycle"
7
+ }
8
+ ]
9
+ - },,
10
+ + },
11
+ {
12
+ type: "category",
13
+ label: "5. AWEL Template",
You can’t perform that action at this time.
0 commit comments