Skip to content

Hourly Academy Expansion #58

Hourly Academy Expansion

Hourly Academy Expansion #58

Workflow file for this run

name: Hourly AI Training Tip
on:
schedule:
- cron: '0 * * * *' # Every hour on the dot
workflow_dispatch: # Allows you to run it manually to test
permissions:
contents: write # Required to allow the bot to push .md files to your repo
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4 # Use V4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Using a modern node version
- name: Install dependencies
run: |
npm init -y
npm install firebase-admin @google/generative-ai@latest
- name: Execute AI Script
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
run: node scripts/generate-ai-tip.js
- name: Commit & Push Documentation 📝
run: |
git config --global user.name 'Academy-Writer-Bot'
git config --global user.email 'bot@littleslaw.com'
git add docs/
git commit -m "Auto-update wiki: [${{ github.workflow }}]" || echo "No changes to commit"
git push