Skip to content

ExtractBlocksAsImages #710

ExtractBlocksAsImages

ExtractBlocksAsImages #710

name: ExtractBlocksAsImages
on:
push:
branches:
- main
paths:
- scripts/portal_blocks_extractor/**
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
extract_blocks:
runs-on: ubuntu-latest
env:
REMID: ${{ secrets.REMID }}
SID: ${{ secrets.SID }}
steps:
- name: Check out this repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: setup chrome
uses: browser-actions/setup-chrome@latest
- name: Install dependencies
run: pip install -r scripts/portal_blocks_extractor/requirements.txt
- name: Run the scraping script
run: python scripts/portal_blocks_extractor/script.py
- name: Commit and push changes
run: |
git fetch --prune --unshallow
git add .
git diff
git config --global user.email "[email protected]"
git config --global user.name "Ranger"
git commit -m "Updated blocks images" -a || echo "No changes to commit"
git push