mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-29 23:01:38 +00:00
ci(docs): Fix build doc error
This commit is contained in:
parent
a73ef0798e
commit
7ce8b3dd4a
22
.github/workflows/doc-image-publish.yml
vendored
22
.github/workflows/doc-image-publish.yml
vendored
@ -1,5 +1,4 @@
|
|||||||
name: Build and push docs image
|
name: Build and push docs image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@ -14,15 +13,29 @@ on:
|
|||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: 'Branch to build (default: main)'
|
||||||
|
required: true
|
||||||
|
default: 'main'
|
||||||
|
type: string
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-image:
|
build-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }}
|
||||||
|
|
||||||
|
- name: Debug git status
|
||||||
|
run: |
|
||||||
|
echo "Current commit: $(git rev-parse HEAD)"
|
||||||
|
echo "Current branch: $(git rev-parse --abbrev-ref HEAD || echo 'detached HEAD')"
|
||||||
|
echo "Main branch commit: $(git rev-parse origin/main)"
|
||||||
|
echo "Using branch: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref_name }}"
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
@ -47,6 +60,7 @@ jobs:
|
|||||||
file: ./docs/Dockerfile-deploy
|
file: ./docs/Dockerfile-deploy
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: false
|
push: false
|
||||||
|
|
||||||
# Only run when it is not a PR, build and push the image
|
# Only run when it is not a PR, build and push the image
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
@ -56,4 +70,4 @@ jobs:
|
|||||||
file: ./docs/Dockerfile-deploy
|
file: ./docs/Dockerfile-deploy
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest
|
tags: eosphorosai/dbgpt-docs:${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref_name }},eosphorosai/dbgpt-docs:latest
|
Loading…
Reference in New Issue
Block a user