-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (30 loc) · 984 Bytes
/
auto-writer.yml
File metadata and controls
37 lines (30 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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