-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 2 KB
/
python-app.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
57
58
59
60
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Generate Hexo Web Page
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '7 23 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Generate Web Pages
env: # Or as an environment variable
A_GITHUB_TOKEN: ${{ secrets.A_GITHUB_TOKEN }}
run: |
python get_info.py
python generate_html.py
- name: Git Commit and Push
# You may pin to the exact commit or the version.
# uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa
uses: github-actions-x/commit@v2.9
with:
# Github Token with commit access
github-token: ${{ secrets.A_GITHUB_TOKEN }}
# Override branch to push to
push-branch: master
# Specify commit message
commit-message: Github Actions - Git Commit
# Force add files, useful for adding ignored files.
force-add: false
# Force push.
force-push: true
# Pull and rebase before commiting. Useful when using commit inside matrix.
rebase: false
# Specific files to add.
files: .
# Committer email. Default is ${name}@users.noreply.github.com
email: ${name}@users.noreply.github.com
# Committer name. Default is name of the person or app that initiated the workflow.
name: Github Actions - Git Commit