HowToCook/.github/workflows/build.yml

44 lines
1.3 KiB
YAML
Raw Normal View History

2022-03-04 15:49:00 +00:00
name: build
2022-02-28 17:04:07 +00:00
on:
push:
2022-03-01 07:15:52 +00:00
branches: [ master ]
2022-02-28 17:04:07 +00:00
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
2022-03-04 16:29:01 +00:00
with:
token: ${{ secrets.PAT }}
2022-02-28 17:04:07 +00:00
- 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'
2022-03-04 16:36:13 +00:00
file_pattern: ':/*.*'
2022-02-28 17:04:07 +00:00
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-03-01 07:27:58 +00:00
- run: echo cook.aiurs.co > CNAME
2022-02-28 18:16:57 +00:00
- run: mkdir docs && echo cook.aiurs.co > docs/CNAME
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