diff --git a/.github/workflows/crawl.yml b/.github/workflows/crawl.yml new file mode 100644 index 00000000..dd1e25e6 --- /dev/null +++ b/.github/workflows/crawl.yml @@ -0,0 +1,32 @@ +name: Crawl law changes + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + update_lawsgit: + name: Update gesetze.git + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install system dependencies + run: sudo apt-get install libxml2-utils libxml2-dev libxslt1-dev -y + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: run scrapers + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + ./updatelawsgit.py + git add data + git commit -m "Update data" + git push diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5312bdf0..9f3b421f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,26 +50,3 @@ jobs: #- name: Test with pytest # run: | # pytest - update_lawsgit: - name: Update gesetze.git - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install system dependencies - run: sudo apt-get install libxml2-utils libxml2-dev libxslt1-dev -y - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: run scrapers - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - ./updatelawsgit.py - git add data - git commit -m "Update data" - git push