Skip to content

Commit

Permalink
ci: add generate-docs (#52)
Browse files Browse the repository at this point in the history
* docs(mkdocs.yaml): add mike

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* docs(mkdocs.yaml): add navigation.indexes

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* docs(mkdocs.yaml): add extra.css for changing content width

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* docs(mkdocs.yaml): fix color

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* docs(mkdocs.yaml): fix image path

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* ci: add generate-docs

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* ci: add remove-old-pr-docs

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* ci(.markdownlint.yaml): Ignore MD046 for admonition

markdownlint/markdownlint#215
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
kenji-miyake authored Dec 1, 2021
1 parent d1ad967 commit 40be0c8
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/generate-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: generate-docs

on:
push:
branches:
- main
- tier4/proposal
paths:
- "mkdocs.yaml"
- "**/*.md"
- "**/*.svg"
- "**/*.png"
- "**/*.css"
pull_request_target:
paths:
- "mkdocs.yaml"
- "**/*.md"
- "**/*.svg"
- "**/*.png"
- "**/*.css"

jobs:
get-docs-version-name:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-get-docs-version-name.yaml@tier4/proposal

generate-docs:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-generate-docs.yaml@tier4/proposal
needs: get-docs-version-name
with:
script-ref: tier4/proposal
mkdocs-yaml: mkdocs.yaml
version-name: ${{ needs.get-docs-version-name.outputs.version-name }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/remove-old-pr-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: remove-old-pr-docs

on:
pull_request_target:
types:
- closed

jobs:
get-docs-version-name:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-get-docs-version-name.yaml@tier4/proposal

remove-old-pr-docs:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-remove-docs.yaml@tier4/proposal
needs: get-docs-version-name
with:
script-ref: tier4/proposal
mkdocs-yaml: mkdocs.yaml
version-name: ${{ needs.get-docs-version-name.outputs.version-name }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ MD024:
siblings_only: true
MD033: false
MD041: false
MD046: false
3 changes: 3 additions & 0 deletions docs/assets/css/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.md-grid {
max-width: 1920px;
}
9 changes: 7 additions & 2 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ theme:
name: material
features:
- navigation.expand
- navigation.indexes
- navigation.instant
- navigation.sections
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
favicon: assets/images/autoware-foundation.png
favicon: docs/assets/images/autoware-foundation.png
icon:
logo: fontawesome/solid/car
repo: fontawesome/brands/github
language: en
palette:
- primary: white
- scheme: default
primary: white
toggle:
icon: material/weather-sunny
name: Switch to dark mode
- scheme: slate
primary: grey
toggle:
icon: material/weather-night
name: Switch to light mode
Expand All @@ -34,8 +36,11 @@ extra:
font:
text: Roboto
code: Roboto Mono
version:
provider: mike

extra_css:
- docs/assets/css/extra.css
- https://use.fontawesome.com/releases/v5.15.4/css/all.css

extra_javascript:
Expand Down

0 comments on commit 40be0c8

Please sign in to comment.