fix: 修复 b23.tv 短链重定向解析 (#300) #1
This file contains hidden or 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
| name: Sync to Hugging Face Space | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| sync-to-huggingface: | |
| runs-on: ubuntu-latest | |
| if: ${{ vars.ENABLE_HF_SYNC == 'true' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Prepare Hugging Face README | |
| run: | | |
| cp README.hf.md README.md | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add README.md | |
| git commit -m "准备 Hugging Face Space 元数据" --allow-empty | |
| - name: Push to Hugging Face Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_USERNAME: ${{ vars.HF_USERNAME }} | |
| HF_SPACE_NAME: ${{ vars.HF_SPACE_NAME }} | |
| run: | | |
| git remote add hf "https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE_NAME}" | |
| git push --force hf HEAD:main |