Skip to content

Scheduled jobs: Update Search Index #10001

Scheduled jobs: Update Search Index

Scheduled jobs: Update Search Index #10001

name: "Scheduled jobs: Update Search Index"
on:
schedule:
- cron: '*/60 * * * *'
workflow_dispatch:
jobs:
update:
name: Update Algolia Search Index
runs-on: ubuntu-latest
environment: production
steps:
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Check out the repo
uses: actions/checkout@v2
with:
token: ${{ secrets.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: ${{ secrets.ALGOLIA_APP_ADMIN_KEY }}
DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }}
notify:
if: failure()
name: Send slack notification
runs-on: ubuntu-latest
needs: [update]
steps:
- 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: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_ICON: https://www.pulumi.com/logos/brand/avatar-on-white.png