feat: add update-en-docs action #4
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: | |
translate: | |
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 app | |
shell: bash | |
run: pnpm build:docs | |
- name: Run search index update | |
shell: bash | |
run: pnpm run update-search-index | |
env: | |
ORAMA_PRIVATE_API_KEY_EN: ${{ secrets.ORAMA_PRIVATE_API_KEY_EN }} | |
ORAMA_PRIVATE_API_KEY_ZH_HANS: ${{ secrets.ORAMA_PRIVATE_API_KEY_ZH_HANS }} | |