Unify steps.
This commit is contained in:
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@@ -17,41 +17,32 @@ jobs:
|
|||||||
readme-gen:
|
readme-gen:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
# Preparation.
|
||||||
- run: node ./.github/readme-generate.js
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
||||||
with:
|
|
||||||
commit_message: "[ci skip] Automatic generate readme"
|
|
||||||
file_pattern: ":/*.md"
|
|
||||||
commit_user_name: github-actions[bot]
|
|
||||||
commit_user_email: github-actions[bot]@users.noreply.github.com
|
|
||||||
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
|
||||||
lint-fix:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '16'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
# Generate Readme.
|
||||||
|
- run: node ./.github/readme-generate.js
|
||||||
|
# Do textlint fix.
|
||||||
- run: ./node_modules/.bin/textlint . --fix
|
- run: ./node_modules/.bin/textlint . --fix
|
||||||
|
# Save files.
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
commit_message: '[ci skip] Automatic textlint fixes'
|
commit_message: '[ci skip] Automatic file changes/fix'
|
||||||
branch: 'master'
|
branch: 'master'
|
||||||
file_pattern: ':/*.md'
|
file_pattern: ':/*.md'
|
||||||
commit_user_name: github-actions[bot]
|
commit_user_name: github-actions[bot]
|
||||||
commit_user_email: github-actions[bot]@users.noreply.github.com
|
commit_user_email: github-actions[bot]@users.noreply.github.com
|
||||||
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: BSFishy/pip-action@v1
|
- uses: BSFishy/pip-action@v1
|
||||||
with:
|
with:
|
||||||
requirements: requirements.txt
|
requirements: requirements.txt
|
||||||
|
# Build docs
|
||||||
- run: mkdocs build
|
- run: mkdocs build
|
||||||
|
# Publish to pages.
|
||||||
- uses: peaceiris/actions-gh-pages@v3
|
- uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user