Spaces:
Running
Running
Deploy ad4de002
Browse files
.github/workflows/deploy-hf.yml
CHANGED
|
@@ -33,23 +33,19 @@ jobs:
|
|
| 33 |
api = HfApi(token=os.environ['HF_TOKEN'])
|
| 34 |
repo_id = 'Sdm0/opencodereview'
|
| 35 |
|
| 36 |
-
# Files/dirs to exclude (matches .gitignore)
|
| 37 |
-
ignore = [
|
| 38 |
-
'*.db', '*.db-wal', '*.db-shm',
|
| 39 |
-
'**/__pycache__', '**/*.pyc',
|
| 40 |
-
'.env', '.venv',
|
| 41 |
-
'.git', '.gitignore', '.github',
|
| 42 |
-
'*.md',
|
| 43 |
-
]
|
| 44 |
-
|
| 45 |
print(f'Uploading to {repo_id} ...')
|
| 46 |
api.upload_folder(
|
| 47 |
repo_id=repo_id,
|
| 48 |
repo_type='space',
|
| 49 |
folder_path=str(Path.cwd()),
|
| 50 |
path_in_repo='.',
|
| 51 |
-
ignore_patterns=
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
commit_message=f'Deploy {os.environ.get(\"GITHUB_SHA\", \"?\")[:8]}',
|
| 54 |
)
|
| 55 |
print('Upload complete!')
|
|
|
|
| 33 |
api = HfApi(token=os.environ['HF_TOKEN'])
|
| 34 |
repo_id = 'Sdm0/opencodereview'
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
print(f'Uploading to {repo_id} ...')
|
| 37 |
api.upload_folder(
|
| 38 |
repo_id=repo_id,
|
| 39 |
repo_type='space',
|
| 40 |
folder_path=str(Path.cwd()),
|
| 41 |
path_in_repo='.',
|
| 42 |
+
ignore_patterns=[
|
| 43 |
+
'*.db', '*.db-wal', '*.db-shm',
|
| 44 |
+
'**/__pycache__', '**/*.pyc',
|
| 45 |
+
'.env', '.venv',
|
| 46 |
+
'.git', '.gitignore', '.github',
|
| 47 |
+
'*.md',
|
| 48 |
+
],
|
| 49 |
commit_message=f'Deploy {os.environ.get(\"GITHUB_SHA\", \"?\")[:8]}',
|
| 50 |
)
|
| 51 |
print('Upload complete!')
|