mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
add lite upload (#9385)
This commit is contained in:
parent
0cad5f348a
commit
832d1d6497
15
.github/workflows/previews-deploy.yml
vendored
15
.github/workflows/previews-deploy.yml
vendored
@ -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
|
||||
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user