feat: update meta #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Search Index | |
| on: | |
| push: | |
| # Run when merging from official repo to check if translations are outdated | |
| branches: | |
| - main | |
| workflow_dispatch: # Allow manual triggering | |
| # Add permissions needed for creating PRs | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-search-index: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repository first to access local actions | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Tools | |
| uses: ./.github/actions/setup | |
| - name: Build docs/zh-hans | |
| shell: bash | |
| run: pnpm build:docs | |
| env: | |
| LOCALE: "zh-hans" | |
| GEN_ORAMA_STATIC: "true" | |
| MDX_ASYNC: "false" | |
| NODE_OPTIONS: "--max-old-space-size=8192" | |
| - name: Update Search Index (zh-hans) | |
| shell: bash | |
| run: pnpm run update-search-index | |
| env: | |
| LOCALE: "zh-hans" | |
| ORAMA_PRIVATE_API_KEY_EN: ${{ secrets.ORAMA_PRIVATE_API_KEY_EN }} | |
| ORAMA_PRIVATE_API_KEY_ZH_HANS: ${{ secrets.ORAMA_PRIVATE_API_KEY_ZH_HANS }} | |
| - name: Build docs/en | |
| shell: bash | |
| run: pnpm build:docs | |
| env: | |
| LOCALE: "en" | |
| GEN_ORAMA_STATIC: "true" | |
| MDX_ASYNC: "false" | |
| NODE_OPTIONS: "--max-old-space-size=8192" | |
| - name: Update Search Index (en) | |
| shell: bash | |
| run: pnpm run update-search-index | |
| env: | |
| LOCALE: "en" | |
| ORAMA_PRIVATE_API_KEY_EN: ${{ secrets.ORAMA_PRIVATE_API_KEY_EN }} | |
| ORAMA_PRIVATE_API_KEY_ZH_HANS: ${{ secrets.ORAMA_PRIVATE_API_KEY_ZH_HANS }} |