HowToCook/.github/workflows/build.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

2022-02-28 17:04:07 +00:00
name: Rebuild project
on:
push:
branches:
- '*'
- '*/*'
- '**'
pull_request:
branches:
- '*'
- '*/*'
- '**'
workflow_dispatch:
jobs:
2022-02-28 18:11:59 +00:00
Rebuild-everything:
2022-02-28 17:04:07 +00:00
runs-on: ubuntu-latest
steps:
2022-02-28 17:42:13 +00:00
# Preparation.
2022-02-28 17:04:07 +00:00
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- run: npm install
2022-02-28 17:42:13 +00:00
# Generate Readme.
- run: node ./.github/readme-generate.js
# Do textlint fix.
2022-02-28 17:04:07 +00:00
- run: ./node_modules/.bin/textlint . --fix
2022-02-28 17:42:13 +00:00
# Save files.
2022-02-28 17:04:07 +00:00
- uses: stefanzweifel/git-auto-commit-action@v4
with:
2022-02-28 17:42:13 +00:00
commit_message: '[ci skip] Automatic file changes/fix'
2022-02-28 17:04:07 +00:00
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>
2022-02-28 17:42:13 +00:00
# Build docs
2022-02-28 18:11:59 +00:00
- run: rm ./node_modules -rvf
2022-02-28 17:45:53 +00:00
- uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_DOMAIN: cook.aiurs.co
CONFIG_FILE: mkdocs.yml
REQUIREMENTS: requirements.txt