forked from openkentuckiana/power-outage-data
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (55 loc) · 1.74 KB
/
pythonapp.yml
File metadata and controls
60 lines (55 loc) · 1.74 KB
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
name: Python application
on:
#push:
schedule:
# * is a special character in YAML so you have to quote this string
#- cron: '*/15 * * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Prepare Selenium #ADDED
# https://github.com/marketplace/actions/setup-chromedriver #ADDED
uses: nanasess/setup-chromedriver@master #ADDED
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Start XVFB
run: |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional, disables headless mode
- name: Run summary scraper
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISPLAY: :99
run: |
python apc/summary_scraper.py
- name: commit summary file
run: |
#git pull
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "update summary" -a
#git add --all
#git commit -am "Latest data: $(date)"
#git push origin master
#env:
# REPO_KEY: ${{secrets.GITHUB_TOKEN}}
# username: github-actions
- name: push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
- name: Run full scraper
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scrape_all.py