Skip to content

Python

Python #1740

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Python
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
#pull_request:
#branches: [ main ]
schedule:
- cron: '*/10 * * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: 'Set up Python'
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: 'Install requirements'
run: |
pip install requests
pip install bs4
pip install fake_useragent
- name: 'Working'
run:
python ./main.py
- name: commit
run: |
git pull
git config --global user.email [email protected]
git config --global user.name zrc4889
git add .
git commit -m "Updated" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}