Add LinkedIn automation workflow for weekly drafts
This commit is contained in:
parent
bc6ecd8f44
commit
ffe31d5fe9
1 changed files with 33 additions and 0 deletions
33
.github/workflows/linkedin_automation.yml
vendored
Normal file
33
.github/workflows/linkedin_automation.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Weekly LinkedIn Draft Generator
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Trigger every Wednesday at 07:00 UTC (9:00 AM Amsterdam Time)
|
||||
- cron: '0 7 * * 3'
|
||||
workflow_dispatch: # Allows you to click "Run workflow" to test it instantly
|
||||
|
||||
jobs:
|
||||
build-and-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Libraries
|
||||
run: pip install requests beautifulsoup4 fpdf
|
||||
|
||||
- name: Run Editorial Assembler
|
||||
run: python generate_post.py
|
||||
|
||||
- name: Commit Drafts to Repository
|
||||
run: |
|
||||
git config --global user.name "Code & Canvas Automation"
|
||||
git config --global user.email "studio@codeandcanvas.com"
|
||||
git add _drafts/*
|
||||
git diff-index --quiet HEAD || git commit -m "automation: generate weekly linkedin draft and pdf asset"
|
||||
git push
|
||||
Loading…
Add table
Reference in a new issue