Skip to content

Fetch RSS Feeds

Fetch RSS Feeds #14594

Workflow file for this run

name: Fetch RSS Feeds
on:
schedule:
- cron: '*/15 * * * *'
workflow_dispatch:
jobs:
fetch-rss-feeds:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install libvips
run: |
sudo apt-get update
sudo apt-get install -y libvips-dev
- name: Cache Node.js dependencies
uses: actions/cache@v4
with:
path: |
packages/fetchRss/node_modules
~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up environment variables
run: |
echo "SUPABASE_URL=${{ secrets.SUPABASE_URL }}" >> $GITHUB_ENV
echo "SUPABASE_KEY=${{ secrets.SUPABASE_KEY }}" >> $GITHUB_ENV
echo "SUPABASE_FEED_TABLE_NAME=${{ secrets.SUPABASE_FEED_TABLE_NAME }}" >> $GITHUB_ENV
echo "SUPABASE_FEED_TYPE_X=${{ secrets.SUPABASE_FEED_TYPE_X }}" >> $GITHUB_ENV
echo "SUPABASE_STORAGE_BUCKET_NAME=${{ secrets.SUPABASE_STORAGE_BUCKET_NAME }}" >> $GITHUB_ENV
echo "SUPABASE_STORAGE_FOLDER_NAME=${{ secrets.SUPABASE_STORAGE_FOLDER_NAME }}" >> $GITHUB_ENV
echo "ERROR_WEBHOOK_URL=${{ secrets.ERROR_WEBHOOK_URL }}" >> $GITHUB_ENV
echo "SUPABASE_EMAIL=${{ secrets.SUPABASE_EMAIL }}" >> $GITHUB_ENV
echo "SUPABASE_PASSWORD=${{ secrets.SUPABASE_PASSWORD }}" >> $GITHUB_ENV
echo "FEED_PARENT_WEBHOOK_URL=${{ secrets.FEED_PARENT_WEBHOOK_URL }}" >> $GITHUB_ENV
- name: Add Sharp
run: |
yarn add sharp --ignore-engines
working-directory: packages/fetchRss
- name: Install dependencies
run: |
yarn install --network-concurrency 1 --ignore-engines
working-directory: packages/fetchRss
- name: Verify Sharp installation
run: |
node -e "require('sharp')"
working-directory: packages/fetchRss
- name: Run Fetch RSS Feeds
run: |
node src/index.js
working-directory: packages/fetchRss