-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add swagger-ui for public API with R2 upload
- Loading branch information
1 parent
75bc24b
commit daa9ca0
Showing
8 changed files
with
4,265 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build and Push Swagger-UI to R2 mainnet-api-docs.spacemesh.network | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'release/openapi/swagger/src/**' | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js v20.14.0 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.14.0' | ||
|
||
- name: npm install | ||
run: npm install | ||
working-directory: release/openapi/swagger | ||
|
||
- name: npm build | ||
run: npm run build | ||
working-directory: release/openapi/swagger | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: swagger-ui-build | ||
path: release/openapi/swagger/dist | ||
|
||
- uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read --follow-symlinks --delete | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} | ||
SOURCE_DIR: release/openapi/swagger/dist | ||
DEST_DIR: '' | ||
AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.idea | ||
bin/ | ||
release/openapi/swagger/node_modules | ||
release/openapi/swagger/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Spacemesh Public API Documentation</title> | ||
</head> | ||
<body> | ||
<div id="swagger"></div> | ||
</body> | ||
</html> |
Oops, something went wrong.