Skip to content

Restore aggregator.js with complete RSS feed configuration #177

Restore aggregator.js with complete RSS feed configuration

Restore aggregator.js with complete RSS feed configuration #177

name: AI-Pulse Auto Aggregator
on:
schedule:

Check failure on line 4 in .github/workflows/update-ai-pulse.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-ai-pulse.yml

Invalid workflow file

You have an error in your yaml syntax on line 4
- cron: '0 */3 * * *' # Every 3 hours push:
branches:
- main
workflow_dispatch: # Manual trigger
permissions:
contents: write
pull-requests: write
issues: write
jobs:
aggregate-and-post:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
npm install axios cheerio rss-parser @octokit/rest
- name: Aggregate AI and Cybersecurity articles
# LinkedIn integration temporarily disabled
# env:
# LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }}
# LINKEDIN_USER_ID: ${{ secrets.LINKEDIN_USER_ID }}
run: |
node src/aggregator.js | tee NEW-README.md
- name: Update README with new content
run: |
rm -rf README.md && mv NEW-README.md README.md
- name: Commit and push changes
env:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add .
if ! git diff --cached --exit-code; then
UTC_DATE=$(date -u +'%a %b %d %H:%M:%S UTC %Y')
git commit -m "Updated AI-Pulse: $UTC_DATE [skip ci]"
git push origin main
else
echo "No changes to commit"
fi