Hasan Iqbal
Added Enable/Disable feature for HF Spaces config
6e0c6d6 unverified
raw
history blame
957 Bytes
name: CI/CD
on:
push:
tags: ["v[0-9].[0-9]+.[0-9]+"]
branches: ["*"]
jobs:
huggingface_deploy:
name: Deploy to Hugging Face
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Enable HuggingFace Spaces Config
run: |
READMEFILE="README.md"
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/<!--/---/g; s/-->/---/g' $READMEFILE
else
sed -i 's/<!--/---/g; s/-->/---/g' $READMEFILE
fi
git add $READMEFILE
git commit -m "Uncommented HuggingFace Spaces Configuration"
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: git push https://hasaniqbal777:[email protected]/spaces/hasaniqbal777/OpenFactCheck main --force