Skip to content

Commit

Permalink
ci: add CI (#13)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Miyake <[email protected]>
  • Loading branch information
kenji-miyake authored Dec 26, 2021
1 parent b6a84fa commit 88163d1
Show file tree
Hide file tree
Showing 14 changed files with 246 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
open-pull-requests-limit: 1
20 changes: 20 additions & 0 deletions .github/workflows/delete-closed-pr-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: delete-closed-pr-docs

on:
schedule:
- cron: 0 19 * * * # run at 4 AM JST
workflow_dispatch:

jobs:
delete-closed-pr-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Delete closed PR docs
uses: autowarefoundation/autoware-github-actions/delete-closed-pr-docs@tier4/proposal
with:
token: ${{ secrets.GITHUB_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy-docs

on:
push:
branches:
- main
- tier4/proposal
paths:
- mkdocs.yaml
- "**/*.md"
- "**/*.svg"
- "**/*.png"
- "**/*.jpg"
pull_request_target:
types:
- opened
- synchronize
- labeled
workflow_dispatch:

jobs:
prevent-no-label-execution:
uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@tier4/proposal
with:
label: documentation

deploy-docs:
needs: prevent-no-label-execution
if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Deploy docs
uses: autowarefoundation/autoware-github-actions/deploy-docs@tier4/proposal
with:
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/semantic-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: semantic-pull-request

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
semantic-pull-request:
uses: autowarefoundation/autoware-github-actions/.github/workflows/semantic-pull-request.yaml@tier4/proposal
16 changes: 16 additions & 0 deletions .github/workflows/spell-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: spell-check

on:
pull_request:

jobs:
spell-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run spell-check
uses: autowarefoundation/autoware-github-actions/spell-check@tier4/proposal
with:
cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/cspell/.cspell.json
7 changes: 7 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
default: true
MD013: false
MD024:
siblings_only: true
MD033: false
MD041: false
MD046: false
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
ci:
autofix_commit_msg: "ci(pre-commit): autofix"
autoupdate_commit_msg: "ci(pre-commit): autoupdate"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.30.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.0
hooks:
- id: prettier

- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
exclude: .*.param.yaml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.1
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.4.1-1
hooks:
- id: shfmt
args: [-w, -s, -i=4]

exclude: .svg
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.param.yaml
2 changes: 2 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
printWidth: 100
tabWidth: 2
12 changes: 12 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: default

rules:
comments:
min-spaces-from-content: 1 # To be compatible with C++ and Python
document-start:
present: false # Don't need document start markers
line-length: disable # Delegate to Prettier
truthy:
allowed-values: ["true", "false", "on"] # https://github.com/adrienverge/yamllint/issues/158#issuecomment-536735525
quoted-strings:
required: only-when-needed # To keep consistent style
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;
}
Binary file added docs/assets/images/autoware-foundation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# autoware-documentation
76 changes: 76 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
site_name: Autoware Documentation
site_url: https://autowarefoundation.github.io/autoware-documentation
repo_url: https://github.com/autowarefoundation/autoware-documentation
edit_uri: edit/main/
docs_dir: docs
copyright: Copyright &copy; 2021 The Autoware Foundation

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
icon:
logo: fontawesome/solid/car
repo: fontawesome/brands/github
language: en
palette:
- 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

extra:
font:
text: Roboto
code: Roboto Mono
version:
provider: mike

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

extra_javascript:
- https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML

plugins:
- awesome-pages
- exclude:
regex:
- ^(?!(.*/)?assets/).*\.(?!(.*\.)?md|(.*\.)?svg|(.*\.)?png|(.*\.)?jpg).*$
- ^(.*/)?[^.]*$
- same-dir
- search

markdown_extensions:
- admonition
- attr_list
- codehilite:
guess_lang: false
- fontawesome_markdown
- footnotes
- mdx_math
- mdx_truly_sane_lists:
nested_indent: 2
- mdx_unimoji
- plantuml_markdown:
server: http://www.plantuml.com/plantuml
format: svg
- pymdownx.arithmatex
- pymdownx.highlight
- pymdownx.superfences
- toc:
permalink: "#"

0 comments on commit 88163d1

Please sign in to comment.