-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.4 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Run Selenium Script
on:
push:
branches:
- master
pull_request:
branches:
- master
# Commented out the schedule to disable it
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
jobs:
run-selenium-script:
runs-on: ubuntu-latest
env:
MIU_EMAIL: ${{ secrets.MIU_EMAIL }}
MIU_PASSWORD: ${{ secrets.MIU_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Chromium
run: |
sudo apt-get update
sudo apt-get install -y chromium-browser
- name: Install ChromeDriver
run: |
sudo apt-get install -y unzip
CHROMEDRIVER_VERSION=$(curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
curl -sS -o chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip
sudo unzip chromedriver_linux64.zip -d /usr/local/bin/
rm chromedriver_linux64.zip
- name: Verify environment variables
run: |
echo "MIU_EMAIL: $MIU_EMAIL"
echo "MIU_PASSWORD: $MIU_PASSWORD"
- name: Run Selenium script
run: |
python script.py