mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
Cloudflare migration (#9206)
* cloudflare packages * cloudflare github action * remove comment * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
2daf3d10f5
commit
bdbcf7b0e3
5
.changeset/curly-bottles-jog.md
Normal file
5
.changeset/curly-bottles-jog.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"website": patch
|
||||
---
|
||||
|
||||
feat:Cloudflare migration
|
18
.github/workflows/website-deploy.yml
vendored
18
.github/workflows/website-deploy.yml
vendored
@ -78,6 +78,15 @@ jobs:
|
||||
shell: bash
|
||||
run: echo "vercel_url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_DEPLOY_TOKEN }} --cwd js/_website)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Deploy Preview Website to Cloudflare Pages
|
||||
if: needs.changes.outputs.pr_number != 'false'
|
||||
id: cloudflare-preview
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy js/_website/build/ --project-name=gradio-website
|
||||
|
||||
# production
|
||||
- name: Pull Vercel Environment Information
|
||||
if: needs.changes.outputs.source_repo == 'gradio-app/gradio' && needs.changes.outputs.source_branch == 'refs/heads/main'
|
||||
@ -89,6 +98,15 @@ jobs:
|
||||
shell: bash
|
||||
run: echo "VERCEL_URL=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_DEPLOY_TOKEN }} --cwd js/_website)" >> $GITHUB_ENV
|
||||
|
||||
- name: Deploy Production Website to Cloudflare Pages
|
||||
if: needs.changes.outputs.source_repo == 'gradio-app/gradio' && needs.changes.outputs.source_branch == 'refs/heads/main'
|
||||
id: cloudflare-production
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy js/_website/build/ --project-name=gradio-website --branch=main
|
||||
|
||||
comment-deploy-success:
|
||||
uses: "./.github/workflows/comment-queue.yml"
|
||||
needs: [deploy, changes]
|
||||
|
@ -30,6 +30,7 @@
|
||||
"hast-util-to-string": "^3.0.0",
|
||||
"mdsvex": "^0.11.0",
|
||||
"postcss": "^8.4.27",
|
||||
"prism-svelte": "^0.5.0"
|
||||
"prism-svelte": "^0.5.0",
|
||||
"wrangler": "^3.72.3"
|
||||
}
|
||||
}
|
||||
|
609
pnpm-lock.yaml
609
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user