z1amez commited on
Commit
c9034e3
·
1 Parent(s): ac25f89
.github/workflows/sync_to_huggingface.yml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ force_push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ sync:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true
16
+ - name: Push to hub
17
+ env:
18
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ run: git push --force https://z1amez:$HF_TOKEN@huggingface.co/spaces/z1amez/wallets-api main
DEPLOYMENT.md CHANGED
@@ -31,7 +31,12 @@ Follow these steps to host your application for free on the web.
31
  - `EMAIL_USER`: (Your Gmail)
32
  - `EMAIL_PASS`: (Gmail App Password)
33
  - `EMAIL_TO`: (Your email)
34
- 7. Push your code to the Space (you can connect it to your GitHub repo in the Settings tab).
 
 
 
 
 
35
  8. Hugging Face will give you a URL like `https://name-space.hf.space`.
36
 
37
  ## 4. Frontend (Vercel)
 
31
  - `EMAIL_USER`: (Your Gmail)
32
  - `EMAIL_PASS`: (Gmail App Password)
33
  - `EMAIL_TO`: (Your email)
34
+ 7. **Automation (Recommended)**: I have added a GitHub Action to your project. To enable it:
35
+ - Go to [Hugging Face Access Tokens](https://huggingface.co/settings/tokens).
36
+ - Create a **Write** token named `github-sync`.
37
+ - In your GitHub repo: **Settings** -> **Secrets** -> **Actions** -> **New repository secret**.
38
+ - Name: `HF_TOKEN`, Value: [Your HF Token].
39
+ - Now, every `git push` will automatically update your Hugging Face Space!
40
  8. Hugging Face will give you a URL like `https://name-space.hf.space`.
41
 
42
  ## 4. Frontend (Vercel)