MicGuest commited on
Commit
d472e51
·
unverified ·
1 Parent(s): 3bcd904

Create main.yml

Browse files

This is to add remote, push to hugging face hub spaces

Files changed (1) hide show
  1. .github/workflows/main.yml +36 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name: Sync to Hugging Face Hub
4
+
5
+ # Controls when the workflow will run
6
+ on:
7
+ # Triggers the workflow on push or pull request events but only for the "main" branch
8
+ push:
9
+ branches: [ "main" ]
10
+
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch:
13
+
14
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
15
+ jobs:
16
+ # This workflow contains a single job called "build"
17
+ sync-to-hub:
18
+ # The type of runner that the job will run on
19
+ runs-on: ubuntu-latest
20
+
21
+ # Steps represent a sequence of tasks that will be executed as part of the job
22
+ steps:
23
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24
+ - uses: actions/checkout@v1
25
+ with:
26
+ fetch_depth: 0
27
+ - name: Add remote
28
+ env:
29
+ HF: ${{ secrets.HF }}
30
+ run: git remote add space https://Michelin1:[email protected]/spaces/michelin1/demo1
31
+
32
+ - name: Push to hub
33
+ env:
34
+ HF: ${{ secrets.HF }}
35
+ run: git remote add space https://Michelin1:[email protected]/spaces/michelin1/demo1 main
36
+