Reindex Wing Docs #1857
This file contains 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: Reindex Wing Docs | |
on: | |
deployment_status: | |
jobs: | |
reindex: | |
name: reindex only when deployment is successful | |
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Login to private npm registry | |
env: | |
GITHUB_TOKEN: ${{ secrets.WING_GITHUB_TOKEN }} | |
run: npm config set @winglang:registry https://npm.pkg.github.com && npm set //npm.pkg.github.com/:_authToken $GITHUB_TOKEN | |
- name: Install dependencies | |
run: npm install | |
- name: run reindex | |
run: npm run reindex | |
env: | |
CRAWLER_API_KEY: ${{ secrets.CRAWLER_API_KEY }} | |
CRAWLER_USER_ID: ${{ secrets.CRAWLER_USER_ID }} | |
CRAWLER_ID: ${{ secrets.CRAWLER_ID }} | |
CRAWLER_API_BASE_URL: https://crawler.algolia.com/api/1 |