Skip to content

Commit a438f61

Browse files
authored
slim test
1 parent aa3921d commit a438f61

1 file changed

Lines changed: 3 additions & 39 deletions

File tree

.github/workflows/ui-publish.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,34 @@
11
name: UI Publish
22

33
on:
4-
workflow_call:
4+
workflow_dispatch:
55
inputs:
66
version_tag:
77
description: 'Version tag to publish under (e.g., b1234)'
88
required: true
99
type: string
10-
secrets:
11-
hf_token:
12-
description: 'Hugging Face token with write access'
13-
required: true
1410

1511
jobs:
16-
build:
17-
name: Build static output
18-
uses: ./.github/workflows/ui-build.yml
19-
2012
publish:
2113
name: Publish UI Static Output
22-
needs: build
23-
runs-on: ubuntu-24.04-arm
14+
runs-on: ubuntu-slim
2415

2516
permissions:
2617
contents: read
2718

2819
env:
29-
HF_BUCKET_NAME: ${{ vars.HF_BUCKET_UI_STATIC_OUTPUT }}
20+
HF_BUCKET_NAME: llama-ui
3021

3122
steps:
3223
- name: Checkout code
3324
uses: actions/checkout@v6
3425
with:
3526
fetch-depth: 1
3627

37-
- name: Download UI build artifact
38-
uses: actions/download-artifact@v7
39-
with:
40-
name: ui-build
41-
path: build/tools/ui/dist/
42-
4328
- name: Install Hugging Face Hub CLI
4429
run: pip install -U huggingface_hub
4530

46-
- name: Authenticate with Hugging Face
47-
run: hf auth login --token ${{ secrets.hf_token }}
48-
49-
- name: Sync built files to Hugging Face bucket (version tag)
50-
run: |
51-
# Upload the built files to the Hugging Face bucket under the release version
52-
hf buckets sync build/tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} --delete --quiet
53-
54-
- name: Sync built files to Hugging Face bucket (latest)
55-
run: |
56-
# Also upload to the 'latest' directory for fallback downloads
57-
hf buckets sync build/tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/latest --delete --quiet
58-
5931
- name: Verify upload
6032
run: |
6133
# List the files in the bucket to verify the upload
6234
hf buckets list hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} -R -h
63-
64-
- name: Clean up root-level files
65-
run: |
66-
# Clean up any old root-level files from previous non-versioned deployments
67-
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/index.html --yes 2>/dev/null || true
68-
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.js --yes 2>/dev/null || true
69-
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.css --yes 2>/dev/null || true
70-
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/loading.html --yes 2>/dev/null || true

0 commit comments

Comments
 (0)