Skip to content

Python application #1548

Python application

Python application #1548

Workflow file for this run

name: Python application
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- ".github/**"
- "README.md"
- "LICENSE"
- ".gitignore"
- ".deepsource.toml"
schedule:
- cron: '0 8 * * 3'
jobs:
build:
runs-on: ubuntu-latest
env:
TZ: "Asia/Shanghai"
SORTED: "stars" # within ['stars', 'updated']
steps:
- uses: actions/checkout@v2
- name: Set up Python3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run Scaffold
run: |
sudo timedatectl set-timezone "Asia/Shanghai"
cd src && python main.py build --force --sort ${{ env.SORTED }} --prod
- name: Setup GIT user
uses: fregante/setup-git-user@v1
- name: Push done work
run: |
git add .
git commit -m "Automated deployment @ $(date '+%Y-%m-%d %H:%M:%S') ${{ env.TZ }} &sorted=${{ env.SORTED }}"
git push -f