File tree Expand file tree Collapse file tree 1 file changed +33
-7
lines changed
Expand file tree Collapse file tree 1 file changed +33
-7
lines changed Original file line number Diff line number Diff line change 99 - master
1010
1111jobs :
12- build :
13- uses : decentraland/platform-actions/.github/workflows/apps-docs.yml@main
14- with :
15- api-spec-file : docs/openapi.yaml
16- api-spec-name : places
17- output-bundle-file : docs/openapi.yaml
18- secrets : inherit
12+ build-and-publish :
13+ runs-on : ubuntu-latest
14+ env :
15+ GITBOOK_TOKEN : ${{ secrets.GITBOOK_TOKEN }}
16+ GITBOOK_ORGANIZATION_ID : ${{ secrets.GITBOOK_ORGANIZATION_ID }}
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Setup Node.js
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : ' 20'
26+ cache : ' npm'
27+
28+ - name : Install dependencies
29+ run : npm ci
30+
31+ - name : Validate OpenAPI specification
32+ run : npx @redocly/cli@latest lint docs/openapi.yaml
33+
34+ - name : Bundle OpenAPI specification
35+ run : npx @redocly/cli@latest bundle docs/openapi.yaml --output docs/openapi-bundled.yaml --ext yaml --dereferenced
36+
37+ - name : Publish to GitBook
38+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
39+ run : |
40+ npm install -g @gitbook/cli
41+ gitbook openapi publish \
42+ --spec "places" \
43+ --organization "$GITBOOK_ORGANIZATION_ID" \
44+ "docs/openapi-bundled.yaml"
You can’t perform that action at this time.
0 commit comments