Skip to content

Commit

Permalink
Docs: update workflow for building docs image (labring#384)
Browse files Browse the repository at this point in the history
Signed-off-by: Carson Yang <[email protected]>
  • Loading branch information
yangchuansheng authored Oct 9, 2023
1 parent 6a84e73 commit cd7214b
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/docs-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
tags:
- 'v*.*.*'
jobs:
build-fastgpt-images:
build-fastgpt-docs-images:
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand Down Expand Up @@ -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:
Expand All @@ -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}}
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

0 comments on commit cd7214b

Please sign in to comment.