Skip to content

Generate New Article #223

Generate New Article

Generate New Article #223

Workflow file for this run

name: Generate New Article
on:
workflow_dispatch:
schedule:
- cron: "0 20 * * *"
jobs:
write_article:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Python Dependencies
run: pip install openai bs4 requests pyyaml xai_sdk
- name: Compose New Article
env:
DS_APIKEY: ${{ secrets.DS_APIKEY }}
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
run: python3 scripts/writer.py
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: new article written" || echo "no changes to commit"
git push origin HEAD:main
compile:
needs: write_article
uses: ./.github/workflows/auto-publisher.yml