mirror of
https://github.com/Anduin2017/HowToCook.git
synced 2025-12-17 18:54:26 +08:00
Unify jobs as build
This commit is contained in:
46
.github/workflows/build.yml
vendored
Normal file
46
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Rebuild project
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
- '*/*'
|
||||||
|
- '**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
- '*/*'
|
||||||
|
- '**'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
readme-gen:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- 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/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
cache: 'npm'
|
||||||
|
- run: npm install
|
||||||
|
- run: ./node_modules/.bin/textlint . --fix
|
||||||
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: '[ci skip] Automatic textlint fixes'
|
||||||
|
branch: 'master'
|
||||||
|
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>
|
||||||
29
.github/workflows/readme-generate.yml
vendored
29
.github/workflows/readme-generate.yml
vendored
@@ -1,29 +0,0 @@
|
|||||||
name: Readme Generate
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
- '*/*'
|
|
||||||
- '**'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
- '*/*'
|
|
||||||
- '**'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
readme-gen:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# if: github.repository_owner == 'Anduin2017'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- 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>
|
|
||||||
35
.github/workflows/textlint.yml
vendored
35
.github/workflows/textlint.yml
vendored
@@ -1,35 +0,0 @@
|
|||||||
name: Textlint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
- '*/*'
|
|
||||||
- '**'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
- '*/*'
|
|
||||||
- '**'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint-fix:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository_owner == 'Anduin2017'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: '16'
|
|
||||||
cache: 'npm'
|
|
||||||
- run: npm install
|
|
||||||
- run: ./node_modules/.bin/textlint . --fix
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
||||||
with:
|
|
||||||
commit_message: '[ci skip] Automatic textlint fixes'
|
|
||||||
branch: 'master'
|
|
||||||
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>
|
|
||||||
Reference in New Issue
Block a user