trentbeal commited on
Commit
59f1954
1 Parent(s): 4a523cf

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
+ # This is a basic workflow to push repo to HF
2
+
3
+ name: CI
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
+ pull_request:
11
+ branches: [ "main" ]
12
+
13
+ # Allows you to run this workflow manually from the Actions tab
14
+ workflow_dispatch:
15
+
16
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
17
+ jobs:
18
+ sync-to-hub:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22
+ - uses: actions/checkout@v3
23
+ with:
24
+ fetch-depth: 0
25
+ - name: Add remote
26
+ env:
27
+ HF: ${{ secrets.HF }}
28
+ run: git remote add space https://tbeal:[email protected]/spaces/trentbeal/quick-demo
29
+ - name: Push to hub
30
+ env:
31
+ HF: ${{ secrets.HF }}
32
+ run: git push --force https://trentbeal:[email protected]/spaces/trentbeal/quick-demo main
33
+ run: |
34
+ echo Add other actions to build,
35
+ echo test, and deploy your project.