Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: publish-cdn script and improve docs
Browse files Browse the repository at this point in the history
AlexVarchuk committed May 27, 2022
1 parent 59aabcc commit 07b077f
Showing 4 changed files with 7 additions and 33 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

[![Build Status](https://travis-ci.com/Redocly/redoc.svg?branch=master)](https://travis-ci.com/Redocly/redoc) [![Coverage Status](https://coveralls.io/repos/Redocly/redoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Redocly/redoc?branch=master) [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Redocly/redoc/blob/master/LICENSE)

[![bundle size](http://img.badgesize.io/https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc) [![Docker Build Status](https://img.shields.io/docker/build/redocly/redoc.svg)](https://hub.docker.com/r/redocly/redoc/)
[![bundle size](http://img.badgesize.io/https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc) [![Docker Build Status](https://img.shields.io/docker/build/redocly/redoc.svg)](https://hub.docker.com/r/redocly/redoc/)
</div>

**This is the README for the `2.x` version of Redoc (React-based).**
@@ -102,9 +102,9 @@ Refer to the Redocly's documentation for more information on these products:
![](docs/images/code-samples-demo.gif)

## Releases
**Important:** all the 2.x releases are deployed to npm and can be used with jsdeliver:
- particular release, for example, `v2.0.0-alpha.15`: https://cdn.jsdelivr.net/npm/redoc@2.0.0-alpha.17/bundles/redoc.standalone.js
- `next` release: https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js
**Important:** all the 2.x releases are deployed to npm and can be used with Redocly-cdn:
- particular release, for example, `v2.0.0-rc.70`: https://cdn.redoc.ly/redoc/v2.0.0-rc.70/bundles/redoc.standalone.js
- `latest` release: https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js

Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(deprecated)**:
- particular release, for example `v1.2.0`: https://rebilly.github.io/ReDoc/releases/v1.2.0/redoc.min.js
@@ -166,7 +166,7 @@ replace the `spec-url` attribute with the url or local file address to your defi
</head>
<body>
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js"> </script>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
</body>
</html>

2 changes: 1 addition & 1 deletion docs/deployment/html.md
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ or the files located in your `node modules` folder.
To reference the Redoc script with a CDN link:

```html
<script src="https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js"> </script>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
```

### Node modules link
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ replace the `spec-url` attribute with the URL or local file address to your defi
<!--
Link to Redoc JavaScript on CDN for rendering standalone element
-->
<script src="https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js"></script>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
</body>
</html>
```
26 changes: 0 additions & 26 deletions scripts/publish-cdn.sh
Original file line number Diff line number Diff line change
@@ -29,33 +29,7 @@ else
aws s3 cp package.json "s3://redocly-cdn/redoc/v$VERSION_TAG/package.json" "$@"
aws s3 cp README.md "s3://redocly-cdn/redoc/v$VERSION_TAG/README.md" "$@"

if [[ "$VERSION_TAG" == "v1.x" ]]; then
echo Uploading to S3 next
aws s3 cp bundles "s3://redocly-cdn/redoc/next/bundles" --recursive "$@"
aws s3 cp typings "s3://redocly-cdn/redoc/next/typings" --recursive "$@"
aws s3 cp CHANGELOG.md "s3://redocly-cdn/redoc/next/CHANGELOG.md" "$@"
aws s3 cp LICENSE "s3://redocly-cdn/redoc/next/LICENSE" "$@"
aws s3 cp package.json "s3://redocly-cdn/redoc/next/package.json" "$@"
aws s3 cp README.md "s3://redocly-cdn/redoc/next/README.md" "$@"

echo Uploading to S3 latest
aws s3 cp bundles "s3://redocly-cdn/redoc/latest/bundles" --recursive "$@"
aws s3 cp typings "s3://redocly-cdn/redoc/latest/typings" --recursive "$@"
aws s3 cp CHANGELOG.md "s3://redocly-cdn/redoc/latest/CHANGELOG.md" "$@"
aws s3 cp LICENSE "s3://redocly-cdn/redoc/latest/LICENSE" "$@"
aws s3 cp package.json "s3://redocly-cdn/redoc/latest/package.json" "$@"
aws s3 cp README.md "s3://redocly-cdn/redoc/latest/README.md" "$@"
fi

if [[ "$VERSION_TAG" == "v2.x" ]]; then
echo Uploading to S3 next
aws s3 cp bundles "s3://redocly-cdn/redoc/next/bundles" --recursive "$@"
aws s3 cp typings "s3://redocly-cdn/redoc/next/typings" --recursive "$@"
aws s3 cp CHANGELOG.md "s3://redocly-cdn/redoc/next/CHANGELOG.md" "$@"
aws s3 cp LICENSE "s3://redocly-cdn/redoc/next/LICENSE" "$@"
aws s3 cp package.json "s3://redocly-cdn/redoc/next/package.json" "$@"
aws s3 cp README.md "s3://redocly-cdn/redoc/next/README.md" "$@"

echo Uploading to S3 latest
aws s3 cp bundles "s3://redocly-cdn/redoc/latest/bundles" --recursive "$@"
aws s3 cp typings "s3://redocly-cdn/redoc/latest/typings" --recursive "$@"

0 comments on commit 07b077f

Please sign in to comment.