Skip to content

Clean up: remove diagnostic debug prints from rawWordToJSON.py #23

Clean up: remove diagnostic debug prints from rawWordToJSON.py

Clean up: remove diagnostic debug prints from rawWordToJSON.py #23

Workflow file for this run

name: Deploy BOOP Web
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
deploy-backend:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure git and clone Space
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git clone https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/${{ secrets.HF_USERNAME }}/BOOP-backend ./hf-space
- name: Sync Backend files into Space
run: |
rsync -a --delete --exclude=.git --exclude=venv --exclude=__pycache__ --exclude=.DS_Store --exclude=uploads --exclude=outputs Backend/ ./hf-space/
cp .github/HF_README.md ./hf-space/README.md
cp .github/HF_gitattributes ./hf-space/.gitattributes
- name: Commit and push to Hugging Face
run: |
cd ./hf-space
git add -A
if git diff --cached --quiet; then
echo "No changes to deploy"
exit 0
fi
git commit -m "Update backend from GitHub - ${{ github.sha }}"
git pull --rebase origin main
git push origin main
# deploy-frontend:
# runs-on: ubuntu-latest
# if: "contains(join(github.event.commits.*.modified, ' '), 'frontend/') || contains(join(github.event.commits.*.added, ' '), 'frontend/') || contains(join(github.event.commits.*.removed, ' '), 'frontend/') || github.event_name == 'workflow_dispatch'"
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '18'
#
# - name: Install Vercel CLI
# run: npm install --global vercel@latest
#
# - name: Deploy to Vercel
# working-directory: ./frontend
# run: |
# vercel --token ${{ secrets.VERCEL_TOKEN }} \
# --prod \
# --yes \
# --confirm \
# -e REACT_APP_API_URL="https://${{ secrets.HF_USERNAME }}-boop-backend.hf.space"