py #1066
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: py | |
on: | |
schedule: | |
- cron: "5 22 * * *" #runs at 00:00 UTC everyday | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content to github runner. | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 #install the python needed | |
- name: Remove Chrome | |
run: sudo apt purge google-chrome-stable | |
- name: Remove default Chromium | |
run: sudo apt purge chromium-browser | |
- name: Install a new Chromium | |
run: sudo apt install -y chromium-browser | |
- name: Set up python libraries | |
run: python -m pip install -r github_action/requirements.txt | |
- name: execute py script # run the run.py to get the latest data | |
run: | | |
python github_action/main.py | |
env: | |
key: ${{ secrets.BOT_TOKEN }} # if run.py requires passwords..etc, set it as |