Skip to content
Merged
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
39 changes: 39 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches: [main]
paths:
- 'open-catalog-api.oas.yaml'
- 'docs/index.html'
- '.github/workflows/docs.yml'
workflow_dispatch:

permissions: {}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: npm ci --ignore-scripts --prefix docs
- run: |
mkdir _site
cp docs/index.html open-catalog-api.oas.yaml _site/
cp docs/node_modules/@scalar/api-reference/dist/browser/standalone.js _site/scalar.js
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0

deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist/
tmp/
node_modules/
.idea/
.vscode

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<div align="center">
<h3>
<a href="https://developers.italia.it/it/api/developers-italia">
<a href="https://publiccodeyml.github.io/open-catalog-api/">
API documentation
</a>
</h3>
Expand Down
18 changes: 18 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<html lang="en">
<head>
<title>Open Catalog API</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div id="app"></div>
<script src="./scalar.js"></script>
<script>
Scalar.createApiReference('#app', {
url: './open-catalog-api.oas.yaml',
proxyUrl: 'https://proxy.scalar.com',
})
</script>
</body>
</html>
Loading
Loading