253ba110bc
* ci: add workflow to publish webui to Hugging Face bucket * ci: add webui release job to release workflow * ci: test webui release job * chore: Return to default minification strategy for build output files * ci: extract webui build into separate workflow and job * chore: Ignore webui static output + clean up references * chore: Delete legacy webui static output * chore: Ignore webui build static output * fix: Workflow * fix: Versioning naming * chore: Update package name * test: Test CI fix * refactor: Naming * server: implement webui build strategy with HF Bucket support * chore: Remove test workflow * chore: Use WebUI build workflow call in other workflows * server: HF Buckets fallback for WebUI build * refactor: App name variable * refactor: Naming * fix: Retrieve loading.html * fix: workflow syntax * fix: Rewrite malformed release.yml * fix: Req param * test: Re-add missing Playwright installation for CI tests * refactor: Logic & security improvements * refactor: Retrieve publishing jobs and DRY the workflows * fix: Test workflow syntax * fix: Upstream Release Tag for test workflow * chore: Remove test workflow * ci: Run WebUI jobs on `ubuntu-24.04-arm` * refactor: Post-CR cleanup Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com> Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * refactor: CI cleanup * refactor: Cleanup * test: Test workflow * refactor: use LLAMA_BUILD_NUMBER instead of LLAMA_BUILD_TAG for HF Bucket webui downloads * server: add fallback mechanism for HF Bucket webui downloads from latest directory * fix: Incorrect argument order in file(SHA256) calls for checksum verification * refactor: Use cmake script for handling the HF Bucket download on build time * feat: support local npm build for WebUI assets * refactor: add `HF_ENABLED` flag to control WebUI build/download provisioning * refactor: Cleanup * chore: Remove test workflow * fix: remove s390x from release workflow * fix: add webui-build dependency to ubuntu-22-rocm and windows-hip * Revert "fix: remove s390x from release workflow" This reverts commit debcfffa9bc1e3112eae41f2d29741b682e4eb19. * fix: Release workflow file * fix: Proper release tag used for HF Bucket upload * fix: Remove duplicate steps in release workflow --------- Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com>
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
name: WebUI Publish
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
version_tag:
|
|
description: 'Version tag to publish under (e.g., b1234)'
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
hf_token:
|
|
description: 'Hugging Face token with write access'
|
|
required: true
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish WebUI Static Output
|
|
runs-on: ubuntu-24.04-arm
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
HF_BUCKET_NAME: ${{ vars.HF_BUCKET_WEBUI_STATIC_OUTPUT }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Download WebUI build artifact
|
|
uses: actions/download-artifact@v7
|
|
with:
|
|
name: webui-build
|
|
path: tools/server/public/
|
|
|
|
- name: Install Hugging Face Hub CLI
|
|
run: pip install -U huggingface_hub
|
|
|
|
- name: Authenticate with Hugging Face
|
|
run: hf auth login --token ${{ secrets.hf_token }}
|
|
|
|
- name: Sync built files to Hugging Face bucket (version tag)
|
|
run: |
|
|
# Upload the built files to the Hugging Face bucket under the release version
|
|
hf buckets sync tools/server/public hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} --delete --quiet
|
|
|
|
- name: Sync built files to Hugging Face bucket (latest)
|
|
run: |
|
|
# Also upload to the 'latest' directory for fallback downloads
|
|
hf buckets sync tools/server/public hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/latest --delete --quiet
|
|
|
|
- name: Verify upload
|
|
run: |
|
|
# List the files in the bucket to verify the upload
|
|
hf buckets list hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} -R -h
|
|
|
|
- name: Clean up root-level files
|
|
run: |
|
|
# Clean up any old root-level files from previous non-versioned deployments
|
|
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/index.html --yes 2>/dev/null || true
|
|
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.js --yes 2>/dev/null || true
|
|
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.css --yes 2>/dev/null || true
|
|
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/loading.html --yes 2>/dev/null || true
|