MicGuest
commited on
Update main.yml
Browse files- .github/workflows/main.yml +11 -24
.github/workflows/main.yml
CHANGED
@@ -1,36 +1,23 @@
|
|
1 |
-
|
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: [
|
10 |
-
|
11 |
-
#
|
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@v2
|
25 |
-
with:
|
26 |
-
|
27 |
-
- name: Add remote
|
28 |
env:
|
29 |
-
HF: ${{ secrets.
|
30 |
-
run: git remote add space https://Michelin1:[email protected]/spaces/
|
31 |
-
|
32 |
- name: Push to hub
|
33 |
env:
|
34 |
-
HF: ${{ secrets.
|
35 |
-
run: git push --force https://Michelin1:[email protected]/spaces/
|
36 |
-
|
|
|
1 |
+
name: Sync to Hugging Face hub
|
|
|
|
|
|
|
|
|
2 |
on:
|
|
|
3 |
push:
|
4 |
+
branches: [main]
|
5 |
+
|
6 |
+
# to run this workflow manually from the Actions tab
|
7 |
workflow_dispatch:
|
8 |
|
|
|
9 |
jobs:
|
|
|
10 |
sync-to-hub:
|
|
|
11 |
runs-on: ubuntu-latest
|
|
|
|
|
12 |
steps:
|
|
|
13 |
- uses: actions/checkout@v2
|
14 |
+
with:
|
15 |
+
fetch-depth: 0
|
16 |
+
- name: Add remote
|
17 |
env:
|
18 |
+
HF: ${{ secrets.HF }}
|
19 |
+
run: git remote add space https://Michelin1:[email protected]/spaces/noahgift/demo
|
|
|
20 |
- name: Push to hub
|
21 |
env:
|
22 |
+
HF: ${{ secrets.HF }}
|
23 |
+
run: git push --force https://Michelin1:[email protected]/spaces/noahgift/demo main
|
|