mirror of
https://github.com/soapingtime/diyhrt.git
synced 2026-09-04 20:10:19 +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,36 @@
|
||||
name: DIYHRT.market
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
|
||||
jobs:
|
||||
archive:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
- name: check for 404
|
||||
run: |
|
||||
url="https://diyhrt.market"
|
||||
status=$(curl -o /dev/null -s -w "%{http_code}" $url)
|
||||
if [ $status -eq 404 ]; then
|
||||
echo "Got 404. Exiting."
|
||||
curl -H "Content-Type: application/json" -d '{"content": "${{ secrets.DISCORD_USER_ID }} $URL returned 404"}' ${{ secrets.WEBHOOK_URL }}
|
||||
exit 1
|
||||
fi
|
||||
- name: download diyhrt.market
|
||||
run: |
|
||||
rm -rf diyhrt.market cdn.diyhrt.market
|
||||
wget -mkpKEH --limit-rate 10m --random-wait --user-agent="Contact: hrt.boytw.ink/crawl_contact.txt" --domains=diyhrt.market,cdn.diyhrt.market https://diyhrt.market || true
|
||||
find . -name "*.orig" -type f -delete
|
||||
- name: commit changes
|
||||
if: ${{ success() }}
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: "['diyhrt.market', 'cdn.diyhrt.market']"
|
||||
pull: "--rebase --autostash ."
|
||||
message: "[automated] update diyhrt.market"
|
||||
default_author: github_actions
|
||||
Reference in New Issue
Block a user