Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to Github Pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: actions/setup-node@v1
with:
node-version: '10.x'

- name: Yarn install
run: yarn install

- name: Build API docs
run: yarn build

- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v2.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./build
with:
emptyCommits: false
20 changes: 20 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint

on: push

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: actions/setup-node@v1
with:
node-version: '10.x'

- name: Yarn install
run: yarn install

- name: Lint API specifications
run: yarn lint
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ npm-debug.log

# IDEA
.idea/

# Yarn
yarn-error.log

# Build
build/
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry "https://maven.eveoh.nl/content/repositories/public-npm/"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ This repository contains API specifications and generated documentation for Eveo
## Publishing

The OpenAPI 3.0 specifications are generated using ReDoc.
Production API documentation pages are automatically published by Github Pages when changes are pushed to the `master` branch.
Production API documentation pages are automatically built by a GitHub Workflow when changes are pushed to the `master` branch.
The resulting build is pushed to the `gh-pages` branch.
The `gh-pages` branch in turn is automatically deployed by Github Pages.

## Development

Expand Down
6 changes: 3 additions & 3 deletions docs/echo-webhooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<body>
<div id="redoc-container"></div>

<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
<script src="assets/js/redoc.standalone.js"></script>

<script>
Redoc.init('https://raw.githubusercontent.com/eveoh/api-specs/master/spec/echo-webhooks.yaml', {
Redoc.init('spec/echo-webhooks.yaml', {
'theme': {
'colors': {
'primary': {
Expand All @@ -30,4 +30,4 @@
}, document.getElementById('redoc-container'))
</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/echo.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<body>
<div id="redoc-container"></div>

<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
<script src="assets/js/redoc.standalone.js"></script>

<script>
Redoc.init('https://raw.githubusercontent.com/eveoh/api-specs/master/spec/echo.yaml', {
Redoc.init('spec/echo.yaml', {
'theme': {
'colors': {
'primary': {
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
"private": true,
"devDependencies": {
"npm-run-all": "4.1.5",
"redoc-cli": "0.8.6",
"redoc-cli": "0.9.2",
"speccy": "0.9.0"
},
"scripts": {
"build": "rm -rf build && mkdir -p build/assets/js && cp -r docs/* build && cp -r spec build && cp node_modules/redoc/bundles/redoc.standalone.js build/assets/js",
"lint": "npm-run-all --parallel lint:*",
"lint:echo": "speccy lint spec/echo.yaml",
"lint:echo-webhooks": "speccy lint spec/echo-webhooks.yaml",
"serve:echo": "redoc-cli serve --watch --port 3000 spec/echo.yaml",
"serve:echo-webhooks": "redoc-cli serve --watch --port 3000 spec/echo-webhooks.yaml"
},
"dependencies": {}
"dependencies": {
"redoc": "2.0.0-rc.16"
}
}
Loading