Create python-app.yml
This commit is contained in:
parent
3a888af951
commit
bd449c189a
1 changed files with 51 additions and 0 deletions
51
.github/workflows/python-app.yml
vendored
Normal file
51
.github/workflows/python-app.yml
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
name: Python application
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 13 * * 0-4"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
# Cache Python dependencies
|
||||
- name: Cache Python dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
# Cache cookie.json
|
||||
- name: Cache app/temp/cookie.json
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: app/temp/cookie.json
|
||||
key: ${{ runner.os }}-cookie-${{ hashFiles('app/temp/cookie.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cookie-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pwd
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
|
||||
- name: Generate Config
|
||||
run: |
|
||||
pwd
|
||||
cd app && gen-config.sh
|
||||
|
||||
- name: Run
|
||||
run: |
|
||||
pwd
|
||||
cd app && ./run.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue