-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 884 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Scrape and push
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
scrape:
name: Scrape and push
runs-on: ubuntu-latest
steps:
- name: Check out repo
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git clone https://${{ secrets.PERSONAL_TOKEN }}@github.com/sk-zk/apple-maps-image-collection.git
- name: Install packages
run: |
cd apple-maps-image-collection
pip install -r requirements.txt
- name: Scrape
run: |
cd apple-maps-image-collection
rm -rf schedules/*
python3 scrape.py
- name: Push
run: |
cd apple-maps-image-collection
git add .
git diff-index --quiet HEAD || git commit -m "Update schedules"
git push