Skip to content

Commit a33eb69

Browse files
committed
Improved build and deployment scripts
1 parent 4aa95d2 commit a33eb69

17 files changed

Lines changed: 470 additions & 598 deletions

.github/workflows/deploy-pages.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
cancel-in-progress: false
2222

2323
jobs:
24-
build:
24+
build-docs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout
@@ -36,27 +36,40 @@ jobs:
3636
- name: Install dependencies
3737
run: npm ci
3838

39-
- name: Build OpenAPI Modules
40-
run: npm run build:ocpi:2.2.1 && npm run build:ocpi:2.3.0
39+
- name: Build OCPI 2.2.1
40+
run: npm run build:ocpi:2.2.1
4141

42-
- name: Build OpenAPI Roles
43-
run: npm run build:ocpi:cpo:2.2.1 && npm run build:ocpi:msp:2.2.1 && npm run build:ocpi:hub:2.2.1 && npm run build:ocpi:cpo:2.3.0 && npm run build:ocpi:msp:2.3.0 && npm run build:ocpi:hub:2.3.0
42+
- name: Build OCPI 2.3.0
43+
run: npm run build:ocpi:2.3.0
4444

45-
- name: Copy index page
46-
run: mkdir -p dist/ocpi/2.2.1 dist/ocpi/2.3.0 && cp ocpi/2.2.1/index.html dist/ocpi/2.2.1/index.html && cp ocpi/2.3.0/index.html dist/ocpi/2.3.0/index.html
47-
48-
- name: Upload artifact
49-
uses: actions/upload-pages-artifact@v3
45+
- name: Upload docs artifact
46+
uses: actions/upload-artifact@v4
5047
with:
48+
name: docs-artifact
5149
path: dist
50+
if-no-files-found: error
5251

5352
deploy:
5453
environment:
5554
name: github-pages
5655
url: ${{ steps.deployment.outputs.page_url }}
5756
runs-on: ubuntu-latest
58-
needs: build
57+
needs: [build-docs]
5958
steps:
59+
- name: Download docs artifact
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: docs-artifact
63+
path: dist
64+
65+
- name: Configure Pages
66+
uses: actions/configure-pages@v5
67+
68+
- name: Upload Pages artifact
69+
uses: actions/upload-pages-artifact@v3
70+
with:
71+
path: dist
72+
6073
- name: Deploy to GitHub Pages
6174
id: deployment
6275
uses: actions/deploy-pages@v4

docs/OCPI-2.3.0.pdf

5.54 MB
Binary file not shown.

ocpi/2.2.1/config.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"modules": {
3+
"credentials": {
4+
"label": "Credentials",
5+
"description": "Credential exchange and registration.",
6+
"interfaces": ["interface"]
7+
},
8+
"versions": {
9+
"label": "Versions",
10+
"description": "Version discovery and information.",
11+
"interfaces": ["interface"]
12+
},
13+
"cdrs": {
14+
"label": "CDRs",
15+
"description": "Charge Detail Records.",
16+
"interfaces": ["sender-interface", "receiver-interface"]
17+
},
18+
"chargingprofiles": {
19+
"label": "ChargingProfiles",
20+
"description": "Smart charging profiles.",
21+
"interfaces": ["sender-interface", "receiver-interface"]
22+
},
23+
"commands": {
24+
"label": "Commands",
25+
"description": "Remote start/stop, reservations, unlock, etc.",
26+
"interfaces": ["sender-interface", "receiver-interface"]
27+
},
28+
"hubclientinfo": {
29+
"label": "HubClientInfo",
30+
"description": "Hub connectivity information.",
31+
"interfaces": ["sender-interface", "receiver-interface"]
32+
},
33+
"locations": {
34+
"label": "Locations",
35+
"description": "Locations, EVSEs and connectors.",
36+
"interfaces": ["sender-interface", "receiver-interface"]
37+
},
38+
"sessions": {
39+
"label": "Sessions",
40+
"description": "Sessions and charging preferences.",
41+
"interfaces": ["sender-interface", "receiver-interface"]
42+
},
43+
"tariffs": {
44+
"label": "Tariffs",
45+
"description": "Tariffs and price components.",
46+
"interfaces": ["sender-interface", "receiver-interface"]
47+
},
48+
"tokens": {
49+
"label": "Tokens",
50+
"description": "Tokens and real-time authorization.",
51+
"interfaces": ["sender-interface", "receiver-interface"]
52+
}
53+
},
54+
"roles": {
55+
"cpo": [
56+
"credentials/interface",
57+
"versions/interface",
58+
"locations/sender-interface",
59+
"sessions/sender-interface",
60+
"cdrs/sender-interface",
61+
"tariffs/sender-interface",
62+
"tokens/receiver-interface",
63+
"commands/receiver-interface",
64+
"chargingprofiles/receiver-interface"
65+
],
66+
"msp": [
67+
"credentials/interface",
68+
"versions/interface",
69+
"locations/receiver-interface",
70+
"sessions/receiver-interface",
71+
"cdrs/receiver-interface",
72+
"tariffs/receiver-interface",
73+
"tokens/sender-interface",
74+
"commands/sender-interface",
75+
"chargingprofiles/sender-interface"
76+
],
77+
"hub": [
78+
"hubclientinfo/sender-interface"
79+
]
80+
}
81+
}

ocpi/2.2.1/index.html

Lines changed: 0 additions & 216 deletions
This file was deleted.

0 commit comments

Comments
 (0)