Skip to content

Commit

Permalink
chore(ci): GitHub Actions for HuggingFace Spaces (#3)
Browse files Browse the repository at this point in the history
* chore(ci): GitHub Actions for HuggingFace Spaces
* chore(ci): fix
* chore(ci): author
* chore(ci): remove pr trigger
* chore(ci): add README.md
  • Loading branch information
nekomeowww authored Dec 25, 2024
1 parent adf87d7 commit 81a630c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy-huggingface-spaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy to HuggingFace Spaces

on:
push:
branches:
- main

jobs:
deploy-moonshine-web-vue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- run: |-
git clone https://$HF_USERNAME:[email protected]/spaces/moeru-ai/moonshine-web-vue --depth 1 packages/moonshine-web/dist
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ secrets.HF_USERNAME }}
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- run: pnpm install
- run: pnpm build

- name: Push to hub
working-directory: ./packages/moonshine-web/dist
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ secrets.HF_USERNAME }}
run: |-
mv ../README.md .
git add .
git config --local user.email "[email protected]"
git config --local user.name "Neko Ayaka"
git commit -m "release: build ${{ github.sha }}"
git push -f

0 comments on commit 81a630c

Please sign in to comment.