update #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ main ] | |
paths: | |
- 'docs/0music sharing site/musicsrc.txt' | |
- 'docs/0music sharing site/*.py' | |
- '.github/workflows/gen.yml' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest pypinyin zhon htmlmin zhconv requests | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: see | |
run: | | |
cd 'docs/0music sharing site' | |
python 'WorshipHtmlGenerator.py' | |
mv index.html ../index.html | |
cd .. | |
git add index.html | |
git config --global user.name 'GitHub action bot' | |
git config --global user.email '[email protected]' | |
git commit -am "Auto generated index.html" | |
git push |