1212# MEILI_ENDPOINT - Meilisearch instance URL
1313# MEILI_API_KEY - API key with documents read/write permission
1414# MEILI_INDEX - Target index name
15- # Repository secrets for the tarball: CDN_ACCESS_KEY, CDN_SECRET_KEY ,
16- # CDN_BUCKET, CDN_REGION, CDN_ENDPOINT .
15+ # Branch mapping for the Meilisearch sync: main -> production ,
16+ # test -> development .
1717#
18- # Branch mapping: main -> production (https://docs-cdn.flashcat.cloud/docs/),
19- # test -> development (https://docs-cdn.flashcat.cloud/test/docs/)
18+ # The tarball is published from main only, to the Flashduty static
19+ # distribution: https://static.flashcat.cloud/flashduty-docs/flashduty-docs.tar.gz
20+ # (OSS bucket flashduty-public). Every deployment reads that one copy.
21+ # Repository secrets for it: STATIC_ACCESS_KEY, STATIC_SECRET_KEY (an AK allowed
22+ # to put objects under flashduty-public/flashduty-docs/).
2023
2124name : Publish docs for AI search
2225
@@ -74,12 +77,12 @@ jobs:
7477 bash ./scripts/upload.sh
7578
7679 bundle :
80+ if : github.ref == 'refs/heads/main'
7781 runs-on : ubuntu-latest
78- environment : ${{ github.event.inputs.environment || (github.ref == 'refs/heads/main' && 'production' || 'development') }}
7982 # Every run uploads the whole tarball, so a newer run supersedes an older
8083 # one; cancelling the older keeps it from finishing last with stale docs.
8184 concurrency :
82- group : docs-bundle-${{ github.event.inputs.environment || (github.ref == 'refs/heads/main' && 'production' || 'development') }}
85+ group : docs-bundle
8386 cancel-in-progress : true
8487 steps :
8588 - name : Checkout
@@ -101,11 +104,11 @@ jobs:
101104 - name : Build and upload docs bundle
102105 working-directory : integration-docs
103106 env :
104- CDN_ACCESS_KEY : ${{ secrets.CDN_ACCESS_KEY }}
105- CDN_SECRET_KEY : ${{ secrets.CDN_SECRET_KEY }}
106- CDN_BUCKET : ${{ secrets.CDN_BUCKET }}
107- CDN_REGION : ${{ secrets.CDN_REGION }}
108- CDN_ENDPOINT : ${{ secrets.CDN_ENDPOINT }}
109- CDN_URL : ' https://docs-cdn .flashcat.cloud'
110- CDN_DIR : ${{ (github.event.inputs.environment || (github.ref == 'refs/heads/main' && 'production' || 'development')) == 'production' && '/ docs' || '/test/docs' }}
107+ CDN_ACCESS_KEY : ${{ secrets.STATIC_ACCESS_KEY }}
108+ CDN_SECRET_KEY : ${{ secrets.STATIC_SECRET_KEY }}
109+ CDN_BUCKET : ' flashduty-public '
110+ CDN_REGION : ' oss-cn-beijing '
111+ CDN_ENDPOINT : ' oss-cn-beijing.aliyuncs.com '
112+ CDN_URL : ' https://static .flashcat.cloud'
113+ CDN_DIR : ' /flashduty- docs'
111114 run : npm run upload:docs-bundle
0 commit comments