fix github.io

This commit is contained in:
Anatoly Karlov 2024-08-13 14:10:26 +07:00
parent d5286d5700
commit 2ed562afcd
5 changed files with 60 additions and 8377 deletions

View File

@ -1,7 +1,10 @@
name: gh-pages name: gh-pages
on: on:
push: push:
branches: [ master ] branches:
- 'master'
- 'main'
env: env:
NODEJS_VERSION: '16' NODEJS_VERSION: '16'
@ -20,12 +23,12 @@ jobs:
node-version: ${{ env.NODEJS_VERSION }} node-version: ${{ env.NODEJS_VERSION }}
cache: npm cache: npm
- run: npm install - run: npm install
- name: Patch specification - name: Build
run: npm run build run: npm run build
- name: Bundle ReDoc site - name: Build static
run: npm run redoc run: npm run docs
- name: Publish ReDoc on Github Pages - name: Publish ReDoc on Github Pages
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist publish_dir: ./static

View File

@ -1,16 +1,19 @@
# See https://docs.redoc.ly/cli/configuration/ for more information. # See https://docs.redoc.ly/cli/configuration/ for more information.
apis: apis:
main: core:
root: 'openapi/openapi.yaml' root: "openapi/openapi.yaml"
lint: plugins:
extends: - './plugins/local.js'
- recommended extends:
plugins: - recommended
- './plugins/local.js' rules:
preprocessors: tag-description: off
local/merge-schemas: on preprocessors:
features.openapi: local/merge-schemas: on
showConsole: true theme:
pagination: section openapi:
layout: three-panel showConsole: true
routingStrategy: browser layout:
scope: section
routingStrategy: browser
htmlTemplate: ./web/index.html

8352
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,19 @@
{ {
"name": "@vality/swag-disputes", "name": "swag-disputes",
"version": "0.1.0", "version": "0.0.1",
"dependencies": { "dependencies": {
"@redocly/cli": "1.4.0", "@redocly/cli": "^1.12.0",
"json-merge-patch": "1.0.2", "json-merge-patch": "^1.0.0",
"redoc-cli": "0.13.21" "redoc-cli": "^0.13.17"
},
"devDependencies": {
"@vality/openapi-generator-cli": "^2.0.0",
"json-merge-patch": "1.0.2"
}, },
"scripts": { "scripts": {
"start": "openapi preview-docs", "start": "openapi preview-docs",
"build": "openapi bundle -o openapi/openapi.yaml", "build": "openapi bundle -o openapi/openapi.yaml",
"redoc": "redoc-cli bundle openapi/openapi.yaml -o dist/index.html", "docs": "redocly build-docs openapi/openapi.yaml --output static/index.html",
"validate": "openapi lint" "validate": "openapi lint"
} }
} }

25
web/index.html Normal file
View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>ContourPay Transfer API</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="favicon.png">
<!--
ReDoc uses font options from the parent element
So override default browser styles
-->
<style>
body {
margin: 0;
padding: 0;
}
</style>
{{{redocHead}}}
</head>
<body>
{{{redocHTML}}}
</body>
</html>