-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
3,265 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
name: make-doc | ||
|
||
# Triggers the workflow on push or pull request events | ||
on: [push, pull_request] # yamllint disable-line | ||
|
||
jobs: | ||
test-redoc: | ||
runs-on: ubuntu-latest | ||
name: Test documentation and generate openapi html documentation | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: lint markdown files | ||
uses: nosborn/[email protected] | ||
with: | ||
files: . | ||
|
||
- name: lint yaml files | ||
uses: ibiqlik/action-yamllint@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: 'maven' | ||
- name: Set up MySQL | ||
uses: shogo82148/actions-setup-mysql@v1 | ||
with: | ||
mysql-version: '8.0' | ||
- run: | | ||
mysql -uroot -h127.0.0.1 -e \ | ||
"CREATE DATABASE access CHARACTER SET utf8mb4 \ | ||
COLLATE utf8mb4_0900_ai_ci;" | ||
- run: | | ||
mysql -uroot -h127.0.0.1 -e \ | ||
"CREATE USER 'access'@'localhost' IDENTIFIED BY 'secret';"; | ||
- run: | | ||
mysql -uroot -h127.0.0.1 -e \ | ||
"GRANT ALL privileges ON access.* TO 'access'@'localhost';" | ||
- name: Generate openapi.json | ||
run: mvn verify -DskipTests=true | ||
|
||
- name: Test api-specs with redoc-cli | ||
uses: seeebiii/redoc-cli-github-action@v10 | ||
with: | ||
args: 'bundle server/target/openapi.json -t template.hbs -o docs/api/index.html' | ||
|
||
- name: check result | ||
run: | | ||
ls -al docs/api/ | ||
test -f docs/api/index.html || (echo "Missing docs/index.html from previous step." && exit 1) | ||
- name: Commit files if the html has changed | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add docs/api/index.html | ||
git diff-index --quiet HEAD || git commit -m "Update github page" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# MD013/line-length - Line length | ||
MD013: | ||
# Number of characters | ||
line_length: 160 | ||
# Number of characters for headings | ||
heading_line_length: 80 | ||
# Number of characters for code blocks | ||
code_block_line_length: 80 | ||
# Include code blocks | ||
code_blocks: false | ||
# Include tables | ||
tables: false | ||
|
||
# MD033/no-inline-html - Inline HTML | ||
MD033: | ||
# Allowed elements | ||
allowed_elements: [br] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*/node_modules/ |
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
Oops, something went wrong.