-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor documentation and add gh-pages workflow (#1084)
Here goes...
- Loading branch information
1 parent
3a4e7ef
commit ccbe574
Showing
73 changed files
with
1,447 additions
and
17,026 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,28 @@ | ||
name: gh-pages | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
gh-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install vitepress | ||
run: cd docs && npm install vitepress | ||
|
||
- name: Build site | ||
run: cd docs && npm run build | ||
|
||
- name: Deploy to GitHub Pages | ||
if: success() | ||
uses: crazy-max/ghaction-github-pages@v2 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: docs/.vitepress/dist | ||
dry_run: true | ||
verbose: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
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
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 |
---|---|---|
@@ -1,22 +1,81 @@ | ||
function getGuideSidebar() { | ||
return [ | ||
{ | ||
text: 'Introduction', | ||
children: [ | ||
{ text: 'What is Swagger-PHP?', link: '/guide/' }, | ||
{ text: 'Installation', link: '/guide/installation' }, | ||
{ text: 'Generating OpenAPI documents', link: '/guide/generating-openapi-documents' }, | ||
] | ||
}, | ||
{ | ||
text: 'Annotating your code', | ||
children: [ | ||
{ text: 'Attributes', link: '/guide/attributes' }, | ||
{ text: 'Annotations', link: '/guide/annotations' }, | ||
{ text: 'Required elements', link: '/guide/required-elements' }, | ||
{ text: 'Common techniques', link: '/guide/common-techniques' }, | ||
] | ||
}, | ||
{ | ||
text: 'Upgrading', | ||
children: [ | ||
{ text: 'Migration from 3.x to 4.x', link: '/guide/migrating-to-v4' }, | ||
{ text: 'Migration from 2.x to 3.x', link: '/guide/migrating-to-v3' }, | ||
] | ||
}, | ||
{ | ||
text: 'Other', | ||
children: [ | ||
{ text: 'Cookbook', link: '/guide/cookbook' }, | ||
{ text: 'Under the hood', link: '/guide/under-the-hood' }, | ||
{ text: 'Related Projects', link: '/related-projects' }, | ||
] | ||
}, | ||
] | ||
} | ||
|
||
function getReferenceSidebar() { | ||
return [ | ||
{ | ||
text: 'Reference', | ||
children: [ | ||
{ text: 'Attributes', link: '/reference/attributes' }, | ||
{ text: 'Annotations', link: '/reference/annotations' }, | ||
] | ||
}, | ||
{ | ||
text: 'Api', | ||
children: [ | ||
{ text: 'Generator', link: '/reference/generator' }, | ||
{ text: 'Processors', link: '/reference/processors' }, | ||
] | ||
}, | ||
] | ||
} | ||
|
||
|
||
module.exports = { | ||
title: "Swagger-PHP", | ||
base: "/swagger-php/", | ||
description: | ||
"Generate OpenAPI documentation for your RESTful API using attributes or annotations.", | ||
description: "Generate OpenAPI documentation for your RESTful API.", | ||
themeConfig: { | ||
sidebar: "auto", | ||
repo: 'zircote/swagger-php', | ||
docsDir: 'docs', | ||
docsBranch: 'master', | ||
editLinks: false, | ||
editLinkText: 'Edit this page on GitHub', | ||
|
||
nav: [ | ||
{ text: "Guide", link: "/Getting-started" }, | ||
{ text: "Supported Annotations", link: "/Supported-annotations" }, | ||
{ | ||
text: "OpenApi", | ||
link: "https://swagger.io/docs/specification/about/" | ||
}, | ||
{ | ||
text: "Specification", | ||
link: "http://swagger.io/specification/" | ||
}, | ||
{ text: "Github", link: "https://github.com/zircote/swagger-php" }, | ||
] | ||
{ text: "User Guide", link: "/guide/" }, | ||
{ text: "Reference", link: "/reference/" }, | ||
{ text: "OpenApi", link: "https://oai.github.io/Documentation/" }, | ||
{ text: "Releases", link: "https://github.com/zircote/swagger-php/releases" }, | ||
], | ||
|
||
sidebar: { | ||
'/guide/': getGuideSidebar(), | ||
'/reference/': getReferenceSidebar() | ||
} | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.