forked from USTC-Resource/USTC-Course
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
codecov: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.6 | ||
- name: install python modules | ||
run: pip install flake8 markdown pypinyin | ||
- name: format code | ||
run: flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics | ||
- name: generate information | ||
run: | | ||
python3 utils/genReadme.py | ||
python3 utils/genIndex.py | ||
- name: git config | ||
run: | | ||
git config user.name "mbinary" | ||
git config user.email "[email protected]" | ||
- name: generate pages and push to gh-pages branch | ||
env: | ||
ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}} | ||
run: | | ||
cd docs | ||
git init | ||
git remote add origin [email protected]:USTC-Resource/USTC-Course.git | ||
git add --all | ||
git commit -m "Update webpages at `date +%Y-%m-%d,%H:%m` UTC+8" | ||
git push -f "https://${ACCESS_TOKEN}@github.com/USTC-Resource/USTC-Course" master:gh-pages | ||