-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): GitHub Actions for HuggingFace Spaces
- Loading branch information
1 parent
adf87d7
commit 00980ab
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy to HuggingFace Spaces | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy-moonshine-web-vue: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
lfs: true | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
repository: https://$HF_USERNAME:[email protected]/spaces/moeru-ai/moonshine-web-vue | ||
fetch-depth: 0 | ||
lfs: true | ||
path: 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: |- | ||
git add . && git commit -m "release: build ${{ github.sha }}" && git push -f |