name: Uploading on Huggingface on: push: branches: [main] workflow_dispatch: jobs: sync-to-hub: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 lfs: true - name: Set Git identity run: | git config --global user.email "github-actions-bot@github.com" git config --global user.name "GitHub Actions" - name: Update README.md run: | tmp_file=$(mktemp) echo "---" >> $tmp_file echo "title: Ve Gans" >> $tmp_file echo "emoji: 🏠" >> $tmp_file echo "colorFrom: yellow" >> $tmp_file echo "colorTo: indigo" >> $tmp_file echo "sdk: streamlit" >> $tmp_file echo "sdk_version: 1.29.0" >> $tmp_file echo "app_file: space.py" >> $tmp_file echo "pinned: false" >> $tmp_file echo "license: openrail" >> $tmp_file echo "---" >> $tmp_file echo "" >> $tmp_file cat README.md >> $tmp_file mv $tmp_file README.md git add README.md git commit -m "Updated README.md" - name: Push to hub env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: git push --force https://zaibutcooler:$HF_TOKEN@huggingface.co/spaces/zaibutcooler/ve-gans main