Skip to content

Commit

Permalink
add lite upload (#9385)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliabd authored and freddyaboulton committed Sep 18, 2024
1 parent 498996e commit deef3b7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/previews-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,15 @@ jobs:
export AWS_DEFAULT_REGION=us-east-1
aws s3 cp ${{ steps.set_tarball_name.outputs.tarball_path }} s3://gradio-npm-previews/${{ needs.changes.outputs.sha }}/
echo "js_tarball_url=https://gradio-npm-previews.s3.amazonaws.com/${{ needs.changes.outputs.sha }}/${{ steps.set_tarball_name.outputs.tarball_name }}" >> $GITHUB_OUTPUT
- name: Upload Lite to S3
id: upload_lite
run: |
export AWS_ACCESS_KEY_ID=${{ secrets.LITE_PREVIEWS_AWS_S3_ACCESS_KEY }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.LITE_PREVIEWS_AWS_S3_SECRET_ACCESS_KEY }}
export AWS_DEFAULT_REGION=us-east-1
mkdir -p ./gradio-lite-files
tar -xzf ./gradio-lite-${{ needs.changes.outputs.sha }}/gradio-lite-*.tgz -C ./gradio-lite-files
aws s3 cp ./gradio-lite-files/package/ s3://gradio-lite-previews/${{ needs.changes.outputs.sha }}/ --recursive
- name: Install Hub Client Library
run: pip install huggingface-hub==0.23.2
# temporary, but ensures the script cannot be modified in a PR
Expand Down Expand Up @@ -147,6 +155,11 @@ jobs:
```bash
npm install ${{ needs.deploy.outputs.js_tarball_url }}
```
**Use Lite from this PR**
```html
<script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/${{ needs.changes.outputs.sha }}/dist/lite.js""></script>
```
comment-spaces-failure:
uses: "./.github/workflows/comment-queue.yml"
needs: [deploy, changes]
Expand Down

0 comments on commit deef3b7

Please sign in to comment.