Merge pull request #28 from koichirokato/update_ros2_docs #136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: documentation | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
poetry-version: ["1.2.1"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Poetry Install Dependencies | |
run: | | |
poetry install --no-interaction | |
- name: Build documents | |
run: | | |
poetry run mkdocs build | |
- uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.event_name != 'pull_request'}} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: site | |
link_checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Link Checker | |
id: lychee | |
uses: lycheeverse/[email protected] | |
with: | |
fail: true | |
args: "--verbose --no-progress './**/*.md' './**/*.html' --timeout 1000 --max-concurrency 32 -T 1 --retry-wait-time 10" | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
textlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
- name: Install textlint | |
run: > | |
npm install --save-dev | |
textlint | |
textlint-rule-preset-smarthr | |
textlint-filter-rule-allowlist | |
- name: Install dependent module | |
run: npm install | |
- name: Execute textlint | |
run: npx textlint "docs/**/*.md" >> ./.textlint.log | |
- name: comment linter error | |
if: ${{ failure() }} | |
run: gh pr comment --body-file ./.textlint.log "${URL}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
URL: ${{ github.event.pull_request.html_url }} | |
linelint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: fernandrone/[email protected] |