mirror of
https://github.com/altstackHQ/altstack-data.git
synced 2026-04-18 02:53:15 +02:00
feat: enhance SEO, add automation, and conversion snippets
This commit is contained in:
39
.github/workflows/scrape-data.yml
vendored
Normal file
39
.github/workflows/scrape-data.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Scrape GitHub Data
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Every day at midnight UTC
|
||||
workflow_dispatch: # Allow manual trigger
|
||||
|
||||
jobs:
|
||||
scrape:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
if [ -f scraper/requirements.txt ]; then
|
||||
pip install -r scraper/requirements.txt
|
||||
fi
|
||||
|
||||
- name: Run scraper
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: python scraper/scraper.py
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
git add data/tools.json
|
||||
git diff --quiet && git diff --staged --quiet || (git commit -m 'chore: nightly data enrichment [skip ci]' && git push)
|
||||
Reference in New Issue
Block a user