Skip to content

Revert "Update issue templates" #11

Revert "Update issue templates"

Revert "Update issue templates" #11

on:
push:
branches: [ dev ]
name: Generate server documentations
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
create-release-notes:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install json-schema-static-docs
- run: touch index.js
- working-directory: ./documentation/server
run: |
echo "const JsonSchemaStaticDocs = require('json-schema-static-docs');
(async () => {
let jsonSchemaStaticDocs = new JsonSchemaStaticDocs({
inputPath: 'schema',
outputPath: 'docs',
ajvOptions: {
allowUnionTypes: true,
},
});
await jsonSchemaStaticDocs.generate();
console.log('Documents generated.');
})();" > index.js
- run: node index.js
working-directory: ./documentation/server
- run: |
echo "function Link(el)
el.target = string.gsub(el.target,'.md', '.html')
return el
end" > links-to-html.lua
working-directory: ./documentation/server
- run: sudo apt-get install pandoc
working-directory: ./documentation/server
- run : echo $(curl https://raw.githubusercontent.com/sindresorhus/github-markdown-css/main/github-markdown-light.css) | sed "s/.markdown-//g" > markdowncss.css
working-directory: ./documentation/server/docs
- run: cp markdowncss.css packs
working-directory: ./documentation/server/docs
- run: cp markdowncss.css welcome
working-directory: ./documentation/server/docs
- run: for i in $(find docs -name "*.md"); do pandoc -f markdown -t html -s "$i" --css markdowncss.css --lua-filter=links-to-html.lua > "${i/.md/.html}"; done;
working-directory: ./documentation/server
- run : find docs -name "*.md" | xargs rm
working-directory: ./documentation/server
- uses: actions/upload-artifact@v3
with:
name: documentation
path: ./documentation/server/docs
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: './documentation/server/docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2