Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scraper automation #64

Open
Be1zebub opened this issue Jul 2, 2024 · 0 comments
Open

Scraper automation #64

Be1zebub opened this issue Jul 2, 2024 · 0 comments

Comments

@Be1zebub
Copy link

Be1zebub commented Jul 2, 2024

The wiki scrape seems to be outdated, its worth automating this work.
I've sketched out a small action for this, I hope it will be useful.

name: Wiki Scraper 

on:
  workflow_dispatch: # manual
  schedule:
    - cron: "0 0 * * *" # daily

jobs:
  scrapper:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
          fetch-depth: 0

      - name: Install python
      - uses: actions/setup-python@v5
        with:
          python-version: "3.10"

      - name: Run Scraper 
        run: python generator/main.py

      - name: Commit changes
        run: |
          git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git config --local user.name "github-actions[bot]"
          git add resources/wiki.json
          git commit -m "Wiki scraper"

      - name: Push changes
      - uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ github.ref }}
@Be1zebub Be1zebub changed the title Scrapper automation Scraper automation Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant