This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
forked from Tokyo-Metro-Gov/covid19
-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (62 loc) · 1.84 KB
/
scraping.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Scraping CI
env:
TZ: 'Asia/Tokyo'
# サイト構造がリニューアルしてスクレイピングに失敗しているので一時的に無効にする
on:
push:
branches-ignore:
- '**'
# on:
# schedule:
# - cron: '0 */6 * * *'
jobs:
scraping:
runs-on: ubuntu-latest
services:
selenium:
image: selenium/standalone-chrome:3.141.59-vanadium
ports:
- 4444:4444
volumes:
- /dev/shm:/dev/shm
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Setup Poetry
uses: dschep/install-poetry-action@v1.2
- name: Poetry Cache venv
uses: actions/cache@v1
with:
path: ~/.venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.venv
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install
- name: Execute
env:
SELENIUM_HOST: localhost
TZ: Asia/Tokyo
run: |
poetry run python ./scrapingSource/Scraping.py
- name: Set git
run: |
git config --local user.name "Tatsumi0000"
git config --local user.email "ti18027@student.miyazaki-u.ac.jp"
git commit -m "Update: コロナ情報" -a
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
with:
title: コロナ情報の更新
commit-message: コロナ情報を更新しました.
branch: auto_update_covid19
labels: auto_merge
base: master
token: ${{ secrets.BOT_TOKEN }}