* fix

* fix again

* fix again
This commit is contained in:
pngwn 2023-06-29 14:07:14 +01:00 committed by GitHub
parent f566f80b44
commit 16782b9b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 17 deletions

View File

@ -5,6 +5,15 @@ inputs:
always-install-pnpm:
description: 'Dictates whether or not we should install pnpm & dependencies, regardless of the cache'
default: false
node_auth_token:
description: 'Node auth token'
default: ""
npm_token:
description: 'npm token'
default: ""
skip_build:
description: 'Skip build'
default: false
runs:
using: "composite"
@ -40,3 +49,6 @@ runs:
uses: "./.github/actions/install-frontend-deps"
with:
always-install-pnpm: ${{ inputs.always-install-pnpm }}
node_auth_token: ${{ inputs.node_auth_token }}
npm_token: ${{ inputs.npm_token }}
skip_build: ${{ inputs.skip_build }}

View File

@ -5,6 +5,15 @@ inputs:
always-install-pnpm:
description: 'Dictates whether or not we should install pnpm & dependencies, regardless of the cache'
default: false
node_auth_token:
description: 'Node auth token'
default: ""
npm_token:
description: 'npm token'
default: ""
skip_build:
description: 'Skip build'
default: false
runs:
using: "composite"
@ -25,11 +34,14 @@ runs:
node-version: 18
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
env:
NODE_AUTH_TOKEN: ${{ inputs.always-install-pnpm }}
NPM_TOKEN: ${{ inputs.always-install-pnpm }}
- name: Install deps
if: steps.frontend-cache.outputs.cache-hit != 'true' || inputs.always-install-pnpm == 'true'
shell: bash
run: pnpm i --frozen-lockfile
- name: Build frontend
if: steps.frontend-cache.outputs.cache-hit != 'true'
if: inputs.skip_build == 'false' && steps.frontend-cache.outputs.cache-hit != 'true'
shell: bash
run: pnpm build

View File

@ -15,21 +15,13 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: setup node.js
uses: actions/setup-node@v3
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: 18
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: install dependencies
run: pnpm install --frozen-lockfile
uses: "./.github/actions/install-all-deps"
with:
always-install-pnpm: true
node_auth_token: ${{ secrets.NPM_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
skip_build: 'true'
- name: Build packages
run: pnpm --filter @gradio/client --filter @gradio/lite build
- name: create and publish versions

View File

@ -9,8 +9,8 @@
"build:cdn": "vite build --mode production:cdn --emptyOutDir",
"build:website": "vite build --mode production:website --emptyOutDir",
"build:local": "vite build --mode production:local --emptyOutDir",
"pybuild:gradio": "cd ../../ && rm -rf gradio/templates/frontend && python3 -m build",
"pybuild:gradio-client": "cd ../../client/python && python3 -m build",
"pybuild:gradio": "cd ../../ && rm -rf gradio/templates/frontend && python -m build",
"pybuild:gradio-client": "cd ../../client/python && python -m build",
"pybuild": "run-p pybuild:*",
"build:lite": "pnpm pybuild && vite build --mode production:lite --emptyOutDir",
"preview": "vite preview",