mirror of
https://github.com/maplibre/martin.git
synced 2024-12-24 23:45:42 +03:00
4814d3369c
Fix #979 with [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) and [markdown-link-check](https://github.com/actions-marketplace-validations/gaurav-nelson_github-action-markdown-link-check) ## Link check - [x] Add link check to just clippy - [x] Add relative links check with [markdown-link-check](https://github.com/actions-marketplace-validations/gaurav-nelson_github-action-markdown-link-check) - [x] Ignore `CHANGELOG.md` - [x] Ignore `localhost` and `127.0.0.1` - [x] Ignore `http://opensource.org` - [x] Add to justfile ## Lintting - [x] Add markdown linting - [x] Add markdown lint to just fmt - [x] Ignore `CHANGELOG.md`? - [x] Ignore [Line Length](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md) - [x] Ignore [First line in a file should be a top-level heading](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md041.md) - [x] Ignore [Inline HTML](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md) - [x] Ignore [Images should have alternate text](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md045.md) - [x] Ignore [Heading levels should only increment by one level at a time](https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md001.md) - [x] Rename lint config file. - [x] Add to justfile --------- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Documentation
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build-docs:
|
|
name: Build Docs
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: 'Validate .md files (use "just fmt-md" to fix)'
|
|
uses: DavidAnson/markdownlint-cli2-action@v14
|
|
with:
|
|
config: '.github/files/config.markdownlint-cli2.jsonc'
|
|
|
|
- name: 'Check Markdown URLs (same as "just clippy-md")'
|
|
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
with:
|
|
use-quiet-mode: 'no'
|
|
use-verbose-mode: 'yes'
|
|
folder-path: 'docs/src'
|
|
file-path: './README.md'
|
|
config-file: '.github/files/markdown.links.config.json'
|
|
|
|
- name: Setup mdBook
|
|
uses: peaceiris/actions-mdbook@v1
|
|
with:
|
|
mdbook-version: 'latest'
|
|
|
|
- run: mdbook build docs
|
|
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
if: github.ref == 'refs/heads/main'
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./target/book
|