phenixrhyder commited on
Commit
7507a23
·
unverified ·
1 Parent(s): 4b23936

Create main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +35 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Phenix Rhyder/ Checkerboard Pattern
2
+ name: Deploy Python App to Hugging Face Spaces
3
+
4
+ # This action will trigger on every push to the 'main' branch
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ # A workflow run is made up of one or more jobs
11
+ jobs:
12
+ # This job syncs your repository content to a Hugging Face Space
13
+ deploy-to-hub:
14
+ # Use the latest version of Ubuntu as the operating system
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ # Step 1: Check out the repository's code so the workflow can access it.
18
+ # We are now fetching the full history because it is clean.
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0 # Using 0 fetches all history, which is correct now.
23
+ lfs: true
24
+
25
+ # Step 2: Push all the files from your GitHub repository to your Hugging Face Space.
26
+ - name: Push to Hugging Face Hub
27
+ env:
28
+ # Your Hugging Face token, stored as a secret
29
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
30
+ run: |
31
+ # This command adds your Hugging Face Space as a new remote destination.
32
+ git remote add space https://user:${HF_TOKEN}@huggingface.co/spaces/phenixrhyder/Checkerboard_Pattern
33
+
34
+ # This command force-pushes the 'main' branch of your GitHub repo to the 'main' branch of the Space.
35
+ git push --force space main