4.11.2 dev (#5368)

* 4.11.2 dev (#103)

* update document

* update doc

* update doc

* doc img

* action

* fix action

* fix: action

* fix: action

* perf: action

* doc

* perf: action
This commit is contained in:
Archer
2025-08-02 19:38:37 +08:00
committed by GitHub
parent 1014f349de
commit 109bdbe9db
137 changed files with 632 additions and 570 deletions

View File

@@ -15,8 +15,46 @@ permissions:
pull-requests: write
jobs:
sync-images:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Checkout target repository
uses: actions/checkout@v4
with:
repository: labring/fastgpt-img
token: ${{ secrets.DOCS_IMGS_SYNC_TOKEN }}
path: fastgpt-img
- name: Sync images
run: |
# Create imgs directory if it doesn't exist
mkdir -p fastgpt-img
# Copy all images from document/public/imgs to the target repository
cp -r document/public/imgs/* fastgpt-img
# Navigate to target repository
cd fastgpt-img
# Configure git
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Add, commit and push changes
git add .
if ! git diff --cached --quiet; then
git commit -m "Sync images from FastGPT document at $(date)"
git push
echo "Images synced successfully"
else
echo "No changes to sync"
fi
# Add a new job to generate unified timestamp
generate-timestamp:
needs: sync-images
runs-on: ubuntu-latest
outputs:
datetime: ${{ steps.datetime.outputs.datetime }}
@@ -40,6 +78,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Rewrite image paths
if: matrix.domain_config.suffix == 'io'
run: |
find document/content/docs -name "*.mdx" -type f | while read file; do
sed -i 's|](/imgs/|](https://cdn.jsdelivr.net/gh/labring/fastgpt-img@main/|g' "$file"
done
- name: Docker meta
id: meta
uses: docker/metadata-action@v5

View File

@@ -20,6 +20,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Rewrite image paths
run: |
find document/content/docs -name "*.mdx" -type f | while read file; do
sed -i 's|](/imgs/|](https://cdn.jsdelivr.net/gh/labring/fastgpt-img@main/|g' "$file"
done
- name: Get current datetime
id: datetime
run: echo "datetime=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT