Deploy #31
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: Deploy | |
| on: | |
| # push: | |
| # branches: [master] | |
| workflow_dispatch: {} | |
| jobs: | |
| deploy-frontend: | |
| name: Frontend → Vercel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy to Vercel | |
| run: npx vercel@latest --prod --yes --token=${{ secrets.VERCEL_TOKEN }} | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| deploy-backend: | |
| name: Backend → HF Spaces | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Push to HF Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_SPACE: ${{ secrets.HF_SPACE }} | |
| run: | | |
| git config --global user.email "ci@github.com" | |
| git config --global user.name "GitHub Actions" | |
| cp -r backend /tmp/hf-deploy | |
| cd /tmp/hf-deploy | |
| git init | |
| git add -A | |
| git commit -m "deploy ${{ github.sha }}" | |
| git push https://user:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE} HEAD:main --force |