mirror of
https://github.com/soapingtime/diyhrt.git
synced 2026-09-05 04:20:20 +02:00
re-initialize and make some changes. repository got to around 2 gigabytes and needed to be more efficient
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
name: Update DIYHRT.cafe links
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "30 23 1 * *" # every 1st of month
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: pypy-3.7-v7.3.3
|
||||
- name: Update links
|
||||
if: always()
|
||||
run: |
|
||||
rm scripts/cafe.txt
|
||||
pip install beautifulsoup4 bs4
|
||||
python scripts/getlinks.py 'https://diyhrt.cafe/index.php/Special:AllPages' > scripts/cafe.txt
|
||||
cd scripts && python formatlinks.py cafe.txt
|
||||
- name: Commit changes
|
||||
if: ${{ success() }}
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: "scripts/cafe.txt"
|
||||
pull: "--rebase --autostash ."
|
||||
message: "[automated] update diyhrt.cafe list"
|
||||
default_author: github_actions
|
||||
Reference in New Issue
Block a user