-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (77 loc) · 3.06 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# 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/Push Changes
# # You may pin to the exact commit or the version.
# # uses: actions-x/commit@0430155bf5e2dd295026c0fc853dfeb0d3c0fe1a
# uses: actions-x/commit@v4
# with:
# # The committer's email address
# email: github-actions-git-commit@users.noreply.github.com
# # The committer's name
# name: Github Actions - Git Commit
# # The commit message
# message: Github Actions - Git Commit
# # The branch to push the changes back to, defaults to the current branch
# branch: ${{ github.ref }}
# # The files to add separated by space, defaults to every file
# files: .
# # The repository to push the code to, defaults to origin (e.g. this repository)
# repository: origin
# # The token used to push the code, not needed if you push to the same repository
# token: ${{ secrets.token }}
# # Whether to perform force push
# force: 0
# # The working directory that will be used for git commands
# directory: .
- 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.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