mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
* add new doc (#5175) Co-authored-by: dreamer6680 <146868355@qq.com> * Test docs (#5235) * fix: change the page of doc * chore: add new dependencies, update global styles/layout, optimize docs, add Feishu & GitHub icons, update API examples * fix: docs/index 404 not found * Update environment variable names, optimize styles, add new API routes, fix component styles, adjust documentation, and update GitHub and Feishu icons * update readme * feat: add a linkfastgpt compontent * feat: update new doc * fix:remove unuse page and redirect homepage to docs (#5288) * fix:remove some unuse doc * fix: redirect homepage to doc * git ignore * fix:navbar to index (#5295) * sidbar * fix: navtab unlight (#5298) * doc --------- Co-authored-by: dreamer6680 <1468683855@qq.com> Co-authored-by: dreamer6680 <146868355@qq.com>
91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
name: Preview documents
|
|
on:
|
|
pull_request_target:
|
|
paths:
|
|
- 'document/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-fastgpt-docs-images:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
# list of Docker images to use as base name for tags
|
|
images: |
|
|
${{ secrets.ALI_IMAGE_NAME }}//fastgpt-docs
|
|
tags: |
|
|
${{ steps.datetime.outputs.datetime }}
|
|
flavor: latest=false
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Aliyun
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: registry.cn-hangzhou.aliyuncs.com
|
|
username: ${{ secrets.ALI_HUB_USERNAME }}
|
|
password: ${{ secrets.ALI_HUB_PASSWORD }}
|
|
|
|
- name: Build and push Docker images
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./document/Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-args: |
|
|
NEXT_PUBLIC_SEARCH_APPKEY=c4708d48f2de6ac5d2f0f443979ef92a
|
|
NEXT_PUBLIC_SEARCH_APPID=HZAF4C2T88
|
|
NEXT_PUBLIC_DOMAIN=https://vzldqobwbwna.sealoshzh.site
|
|
outputs:
|
|
tags: ${{ steps.datetime.outputs.datetime }}
|
|
|
|
update-docs-image:
|
|
needs: build-fastgpt-docs-images
|
|
runs-on: ubuntu-24.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: set image deployment/fastgpt-docs-preview fastgpt-docs-preview=${{ secrets.ALI_IMAGE_NAME }}//fastgpt-docs:${{ needs.build-fastgpt-docs-images.outputs.tags }}
|
|
- uses: actions-hub/kubectl@master
|
|
env:
|
|
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
|
with:
|
|
args: annotate deployment/fastgpt-docs-preview originImageName="${{ secrets.ALI_IMAGE_NAME }}//fastgpt-docs:${{ needs.build-fastgpt-docs-images.outputs.tags }}" --overwrite
|
|
|
|
- name: '@finleyge/github-tools'
|
|
uses: FinleyGe/github-tools@0.0.1
|
|
id: print-image-label
|
|
if: success()
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tool: issue-comment
|
|
title: 'Docs Preview:'
|
|
body: |
|
|
```
|
|
🔗 Preview URL: https://vzldqobwbwna.sealoshzh.site
|
|
```
|