diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7915d2f..5ad909b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,10 +32,12 @@ jobs: env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | - cd dist - git init + git clone https://${{ secrets.HF_USERNAME }}:$HF_TOKEN@huggingface.co/spaces/mlc-ai/${{ vars.SPACE_NAME }} hf_space + cd hf_space + rm -rf ./* + cp -r ../dist/* . git config user.email "github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" git add . git commit -m "Update build artifacts and README" - git push --force https://${{ secrets.HF_USERNAME }}:$HF_TOKEN@huggingface.co/spaces/${{ secrets.HF_USERNAME }}/${{ secrets.SPACE_NAME }} HEAD:main \ No newline at end of file + git push origin \ No newline at end of file