2021-01-11 13:19:13 +03:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-02-04 17:46:35 +03:00
|
|
|
- main
|
2021-01-11 13:19:13 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-02-04 17:46:35 +03:00
|
|
|
- main
|
2021-01-11 13:19:13 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: mdbook
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-02-04 17:46:35 +03:00
|
|
|
- uses: actions/checkout@main
|
2021-01-11 13:19:13 +03:00
|
|
|
|
|
|
|
- name: Install mdbook-dtmo
|
|
|
|
run: |
|
2022-05-06 13:17:46 +03:00
|
|
|
scripts/crate.sh --repo badboy/mdbook-dtmo --to ~/.cargo/bin
|
2021-01-11 13:19:13 +03:00
|
|
|
mdbook-dtmo --version
|
|
|
|
|
|
|
|
- name: Build book
|
|
|
|
run: |
|
|
|
|
mdbook-dtmo build .
|
|
|
|
|
2022-08-24 23:07:47 +03:00
|
|
|
get-changed-md-files:
|
|
|
|
name: get-changed-md-files
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@main
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
2024-01-02 19:47:47 +03:00
|
|
|
uses: tj-actions/changed-files@v41
|
2022-08-24 23:07:47 +03:00
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
README.md
|
|
|
|
src/**/*.md
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
|
|
|
2021-01-11 13:19:13 +03:00
|
|
|
spell-check:
|
2022-08-24 23:07:47 +03:00
|
|
|
needs: get-changed-md-files
|
2021-01-11 13:19:13 +03:00
|
|
|
name: spell-check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-02-04 17:46:35 +03:00
|
|
|
- uses: actions/checkout@main
|
2021-01-11 13:19:13 +03:00
|
|
|
|
|
|
|
- name: Spell check
|
|
|
|
run: |
|
|
|
|
npm install
|
2022-08-24 23:07:47 +03:00
|
|
|
scripts/spell_check.sh ${{ needs.get-changed-md-files.outputs.changed_files }}
|
2021-01-11 13:19:13 +03:00
|
|
|
|
|
|
|
link-check:
|
2022-08-24 23:07:47 +03:00
|
|
|
needs: get-changed-md-files
|
2021-01-11 13:19:13 +03:00
|
|
|
name: link-check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-02-04 17:46:35 +03:00
|
|
|
- uses: actions/checkout@main
|
2021-01-11 13:19:13 +03:00
|
|
|
|
|
|
|
- name: Link check
|
|
|
|
run: |
|
|
|
|
npm install
|
2022-08-24 23:07:47 +03:00
|
|
|
scripts/link_check.sh ${{ needs.get-changed-md-files.outputs.changed_files }}
|
2021-01-11 13:19:13 +03:00
|
|
|
|
|
|
|
prettier-check:
|
2022-08-24 23:07:47 +03:00
|
|
|
needs: get-changed-md-files
|
2021-01-11 13:19:13 +03:00
|
|
|
name: prettier-check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-02-04 17:46:35 +03:00
|
|
|
- uses: actions/checkout@main
|
2021-01-11 13:19:13 +03:00
|
|
|
|
|
|
|
- name: Prettier check
|
|
|
|
run: |
|
|
|
|
npm install
|
2022-08-24 23:07:47 +03:00
|
|
|
scripts/prettier_fix.sh ${{ needs.get-changed-md-files.outputs.changed_files }}
|
|
|
|
git --no-pager diff --color --exit-code src/ README.md
|