feat(hfsup): new integration, added back airi deploy to HF Spaces (#6)
* fix: pwa issue, special `TARGET_HUGGINGFACE_SPACE` for hf spaces, half width issue
This commit is contained in:
@@ -26,11 +26,11 @@ jobs:
|
||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
||||
|
||||
# - run: |-
|
||||
# git clone https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/moeru-ai/airi --depth 1 packages/stage/dist
|
||||
# env:
|
||||
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
# HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
||||
- run: |-
|
||||
git clone https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/moeru-ai/airi --depth 1 packages/stage/dist
|
||||
env:
|
||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
||||
|
||||
- uses: pnpm/action-setup@v3
|
||||
- uses: actions/setup-node@v4
|
||||
@@ -40,11 +40,14 @@ jobs:
|
||||
|
||||
- run: pnpm install
|
||||
- run: pnpm build
|
||||
env:
|
||||
TARGET_HUGGINGFACE_SPACE: 'true'
|
||||
VITE_APP_TARGET_HUGGINGFACE_SPACE: 'true'
|
||||
|
||||
- id: moonshine_web_diff
|
||||
working-directory: ./packages/moonshine-web/dist
|
||||
run: |-
|
||||
mv ../README.md .
|
||||
git lfs ls-files --all
|
||||
git add .
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
echo "changes=true" >> "$GITHUB_OUTPUT";
|
||||
@@ -59,12 +62,13 @@ jobs:
|
||||
git config --local user.email "neko@ayaka.moe"
|
||||
git config --local user.name "Neko Ayaka"
|
||||
git commit -m "release: build ${{ github.sha }}"
|
||||
git lfs push origin main --all
|
||||
git push -f
|
||||
|
||||
- id: whisper_webgpu_diff
|
||||
working-directory: ./packages/whisper-webgpu/dist
|
||||
run: |-
|
||||
mv ../README.md .
|
||||
git lfs ls-files --all
|
||||
git add .
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
echo "changes=true" >> "$GITHUB_OUTPUT";
|
||||
@@ -79,24 +83,26 @@ jobs:
|
||||
git config --local user.email "neko@ayaka.moe"
|
||||
git config --local user.name "Neko Ayaka"
|
||||
git commit -m "release: build ${{ github.sha }}"
|
||||
git lfs push origin main --all
|
||||
git push -f
|
||||
|
||||
# - id: airi_diff
|
||||
# working-directory: ./packages/stage/dist
|
||||
# run: |-
|
||||
# mv ../README.md .
|
||||
# git add .
|
||||
# if [[ -n $(git status --porcelain) ]]; then
|
||||
# echo "changes=true" >> "$GITHUB_OUTPUT";
|
||||
# fi
|
||||
- id: airi_diff
|
||||
working-directory: ./packages/stage/dist
|
||||
run: |-
|
||||
git lfs ls-files --all
|
||||
git add .
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
echo "changes=true" >> "$GITHUB_OUTPUT";
|
||||
fi
|
||||
|
||||
# - if: steps.airi_diff.outputs.changes == 'true'
|
||||
# working-directory: ./packages/stage/dist
|
||||
# env:
|
||||
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
# HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
||||
# run: |-
|
||||
# git config --local user.email "neko@ayaka.moe"
|
||||
# git config --local user.name "Neko Ayaka"
|
||||
# git commit -m "release: build ${{ github.sha }}"
|
||||
# git push -f
|
||||
- if: steps.airi_diff.outputs.changes == 'true'
|
||||
working-directory: ./packages/stage/dist
|
||||
env:
|
||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
||||
run: |-
|
||||
git config --local user.email "neko@ayaka.moe"
|
||||
git config --local user.name "Neko Ayaka"
|
||||
git commit -m "release: build ${{ github.sha }}"
|
||||
git lfs push origin main --all
|
||||
git push -f
|
||||
|
||||
Reference in New Issue
Block a user