Scheduled jobs: Update Search Index #18037
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
| permissions: write-all # Equivalent to default permissions + id-token: write | |
| name: "Scheduled jobs: Update Search Index" | |
| on: | |
| schedule: | |
| - cron: '*/60 * * * *' | |
| workflow_dispatch: null | |
| jobs: | |
| update: | |
| name: Update Algolia Search Index | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Fetch secrets from ESC | |
| id: esc-secrets | |
| uses: pulumi/esc-action@v1 | |
| - name: Install Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| - name: Check out the repo | |
| uses: actions/checkout@v2 | |
| with: | |
| token: ${{ steps.esc-secrets.outputs.PULUMI_BOT_TOKEN }} | |
| - name: Update search indexes | |
| run: | | |
| yarn install | |
| make ci_update_search_index | |
| env: | |
| ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }} | |
| ALGOLIA_APP_SEARCH_KEY: ${{ vars.ALGOLIA_APP_SEARCH_KEY }} | |
| ALGOLIA_APP_ADMIN_KEY: ${{ steps.esc-secrets.outputs.ALGOLIA_APP_ADMIN_KEY }} | |
| DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }} | |
| notify: | |
| if: failure() | |
| name: Send slack notification | |
| runs-on: ubuntu-latest | |
| needs: [update] | |
| steps: | |
| - name: Fetch secrets from ESC | |
| id: esc-secrets | |
| uses: pulumi/esc-action@v1 | |
| - name: Slack Notification | |
| uses: docker://sholung/action-slack-notify:v2.3.0 | |
| env: | |
| SLACK_CHANNEL: docs-ops-test | |
| SLACK_COLOR: "#F54242" | |
| SLACK_MESSAGE: "update search index failure in pulumi/docs repo :meow_sad:" | |
| SLACK_USERNAME: docsbot | |
| SLACK_WEBHOOK: ${{ steps.esc-secrets.outputs.SLACK_WEBHOOK_URL }} | |
| SLACK_ICON: https://www.pulumi.com/logos/brand/avatar-on-white.png | |
| env: | |
| ESC_ACTION_OIDC_AUTH: true | |
| ESC_ACTION_OIDC_ORGANIZATION: pulumi | |
| ESC_ACTION_OIDC_REQUESTED_TOKEN_TYPE: urn:pulumi:token-type:access_token:organization | |
| ESC_ACTION_ENVIRONMENT: github-secrets/pulumi-docs | |
| ESC_ACTION_EXPORT_ENVIRONMENT_VARIABLES: false |