Update organization link and remove Supabase badge #212
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: AI-Pulse Auto Aggregator | ||
| on: | ||
| schedule: | ||
| - 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 | ||