From cd7214ba8dc011c53d39d1e684515c335cdbdb93 Mon Sep 17 00:00:00 2001 From: Carson Yang Date: Mon, 9 Oct 2023 14:32:47 +0800 Subject: [PATCH] Docs: update workflow for building docs image (#384) Signed-off-by: Carson Yang --- .github/workflows/docs-image.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-image.yml b/.github/workflows/docs-image.yml index 4d8bc26b7..3b449be4d 100644 --- a/.github/workflows/docs-image.yml +++ b/.github/workflows/docs-image.yml @@ -9,7 +9,7 @@ on: tags: - 'v*.*.*' jobs: - build-fastgpt-images: + build-fastgpt-docs-images: runs-on: ubuntu-20.04 steps: - name: Checkout @@ -59,7 +59,7 @@ jobs: -f docSite/Dockerfile \ . push-to-docker-hub: - needs: build-fastgpt-images + needs: build-fastgpt-docs-images runs-on: ubuntu-20.04 if: github.repository == 'labring/FastGPT' steps: @@ -82,4 +82,17 @@ jobs: - name: Tag image with Docker Hub repository name and version tag run: docker tag ghcr.io/${{ github.repository_owner }}/fastgpt-docs:${{env.IMAGE_TAG}} ${{ secrets.DOCKER_IMAGE_NAME }}:${{env.IMAGE_TAG}} - name: Push image to Docker Hub - run: docker push ${{ secrets.DOCKER_IMAGE_NAME }}:${{env.IMAGE_TAG}} \ No newline at end of file + run: docker push ${{ secrets.DOCKER_IMAGE_NAME }}:${{env.IMAGE_TAG}} + + update-docs-image: + needs: build-fastgpt-docs-images + runs-on: ubuntu-20.04 + if: github.repository == 'labring/FastGPT' + steps: + - name: Checkout code + uses: actions/checkout@v3 + - uses: actions-hub/kubectl@master + env: + KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} + with: + args: rollout restart deployment fastgpt-docs \ No newline at end of file