mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-27 04:24:16 +00:00
fix(docs): Fix document build error (#2271)
This commit is contained in:
18
.github/workflows/doc-image-publish.yml
vendored
18
.github/workflows/doc-image-publish.yml
vendored
@@ -6,9 +6,12 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -16,24 +19,29 @@ permissions:
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: ubuntu-latest
|
||||
# run unless event type is pull_request
|
||||
if: github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
# Only login to Docker Hub when not in PR
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./docs/Dockerfile-deploy
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest
|
||||
# Only push when not in PR
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ github.event_name != 'pull_request' && 'eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest' || '' }}
|
Reference in New Issue
Block a user