Skip to content

Generate New Article #8

Generate New Article

Generate New Article #8

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 libraries
run: |
pip install openai bs4 requests pyyaml
- name: Article creation script
env:
DS_APIKEY: ${{ secrets.DS_APIKEY }}
run: |
python3 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 "feat(auto): created new article" || echo "no changes to commit"
git push origin HEAD:main
compile:
needs: write_article
uses: ./.github/workflows/publ.yml