Skip to content

Commit 5a5aa12

Browse files
committed
fix GH pages deploy
1 parent 50ca4db commit 5a5aa12

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/pages.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Swagger UI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: "24"
25+
- name: Install dependencies
26+
run: npm install
27+
- name: Build Swagger UI assets
28+
run: npm run build
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: ./docs
33+
deploy:
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
runs-on: ubuntu-latest
38+
needs: build
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "rgb-lightning-node-docs",
3+
"version": "0.1.0",
4+
"description": "API documentation for RGB Lightning Node",
5+
"scripts": {
6+
"build": "mkdir -p docs && cp -r node_modules/swagger-ui-dist/* docs/ && cp openapi.yaml docs/ && sed -i 's|https://petstore.swagger.io/v2/swagger.json|./openapi.yaml|g' docs/swagger-initializer.js"
7+
},
8+
"dependencies": {
9+
"swagger-ui-dist": "^5.31.0"
10+
},
11+
"devDependencies": {},
12+
"private": true
13+
}

0 commit comments

Comments
 (0)