scraper #68
This file contains 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: scraper | |
on: | |
schedule: | |
- cron: '0 8 * * *' | |
workflow_dispatch: | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: npm ci | |
- name: Install custom dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -yq \ | |
gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ | |
libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 \ | |
libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 \ | |
libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \ | |
libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ | |
libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget | |
- name: Build TypeScript | |
run: npm run build | |
- name: Run scraper | |
env: | |
SUPABASE_PROJECT_URL: ${{ secrets.SUPABASE_PROJECT_URL }} | |
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
run: node build/src/main |