Skip to content

Index Redpanda YouTube videos and upload to Algolia #45

Index Redpanda YouTube videos and upload to Algolia

Index Redpanda YouTube videos and upload to Algolia #45

---
name: Index Redpanda YouTube videos and upload to Algolia
on:
schedule:
- cron: '0 23 * * 0' # Runs every Sunday at 11pm UTC
workflow_dispatch:
jobs:
update-algolia-index:
runs-on: ubuntu-latest
steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_SM_READONLY_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SM_READONLY_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: get secrets from aws sm
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/algolia
,sdlc/prod/github/youtube_api_key
,sdlc/prod/github/actions_bot_token
parse-json-secrets: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: cd scripts/index-youtube && npm install
- name: Run indexing script
run: node scripts/index-youtube/index-youtube.js
env:
ALGOLIA_INDEX_NAME: redpanda
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "auto-docs: Update YouTube records"
token: ${{ env.ACTIONS_BOT_TOKEN }}
branch: update-branch-${{ matrix.branch }}
title: "auto-docs: Update YouTube records"
body: "Updates the YouTube data that is made available to docs for purposes such as automated cross-linking."
labels: auto-docs
reviewers: JakeSCahill, Deflaimun