-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.3 KB
/
scrap_action.yaml
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
name: Nepse Data Auto Scrape
on:
push:
branches:
- main
schedule:
- cron: '0 10 */2 * *' # runs everyday at 10 am
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./scrapper
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python Environment
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install Dependencies
run: |
pip install -r requirements.txt
- name: Execute Scraping Script
run: |
python ipo_scrapper.py
# change working directory to root
- name: Change Working Directory
run: |
cd ..
# - name: Check for Changes
# id: check_changes
# run: |
# git diff --exit-code --quiet
# echo "::set-output name=changed::$?"
- name: Commit and Push Files
# if: steps.check_changes.outputs.changed == 'false'
run: |
git config --local user.email "[email protected]"
git config --local user.name "Ranjit Shrestha"
git add .
git commit --allow-empty -am "IPO scrapper ran at $(date)"
git pull origin main
git push origin main