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
on:
push:
branches: [ master ]
branches:
- 'master'
- 'main'
env:
NODEJS_VERSION: '16'
@ -20,12 +23,12 @@ jobs:
node-version: ${{ env.NODEJS_VERSION }}
cache: npm
- run: npm install
- name: Patch specification
- name: Build
run: npm run build
- name: Bundle ReDoc site
run: npm run redoc
- name: Build static
run: npm run docs
- name: Publish ReDoc on Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
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.
apis:
main:
root: 'openapi/openapi.yaml'
lint:
extends:
- recommended
plugins:
core:
root: "openapi/openapi.yaml"
plugins:
- './plugins/local.js'
preprocessors:
extends:
- recommended
rules:
tag-description: off
preprocessors:
local/merge-schemas: on
features.openapi:
theme:
openapi:
showConsole: true
pagination: section
layout: three-panel
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",
"version": "0.1.0",
"name": "swag-disputes",
"version": "0.0.1",
"dependencies": {
"@redocly/cli": "1.4.0",
"json-merge-patch": "1.0.2",
"redoc-cli": "0.13.21"
"@redocly/cli": "^1.12.0",
"json-merge-patch": "^1.0.0",
"redoc-cli": "^0.13.17"
},
"devDependencies": {
"@vality/openapi-generator-cli": "^2.0.0",
"json-merge-patch": "1.0.2"
},
"scripts": {
"start": "openapi preview-docs",
"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"
}
}

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>