barreloflube commited on
Commit
24c097b
·
1 Parent(s): f9009da

feat: Add GitHub Actions workflow for Hugging Face Space deployment

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +85 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ # to run this workflow manually from the Actions tab
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build-and-sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v3
15
+ with:
16
+ fetch-depth: 0
17
+ lfs: true
18
+
19
+ - name: Setup Bun
20
+ uses: oven-sh/setup-bun@v1
21
+ with:
22
+ bun-version: latest
23
+
24
+ - name: Install dependencies
25
+ run: bun install
26
+
27
+ - name: Build app
28
+ run: bun run build
29
+
30
+ - name: Update README for Hugging Face Space
31
+ run: |
32
+ cat > README.md << 'EOL'
33
+ ---
34
+ title: Sheer
35
+ emoji: 🚀
36
+ colorFrom: indigo
37
+ colorTo: purple
38
+ sdk: static
39
+ pinned: true
40
+ ---
41
+
42
+ # Sheer
43
+
44
+ ## About
45
+
46
+ This Space showcases a modern React application built with Bun and Vite. It demonstrates the power of modern web technologies combined with seamless deployment.
47
+
48
+ ## Features
49
+
50
+ - Fast and responsive UI built with React and Tailwind CSS
51
+ - Optimized build process using Bun and Vite
52
+ - Modern development experience with TypeScript
53
+ - Comprehensive UI component library
54
+
55
+ ## How to Use
56
+
57
+ Simply explore the application in this Space! The app is statically hosted and ready to use.
58
+
59
+ ## Technologies Used
60
+
61
+ - React 19
62
+ - Bun
63
+ - Vite
64
+ - TypeScript
65
+ - Tailwind CSS
66
+ - Radix UI Components
67
+
68
+ ## Development
69
+
70
+ This Space is automatically updated via GitHub Actions from the repository. Any changes pushed to the main branch are automatically built and deployed to this Space.
71
+
72
+ ## License
73
+
74
+ See LICENSE file for details.
75
+ EOL
76
+
77
+ - name: Push to Hugging Face Hub
78
+ env:
79
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
80
+ run: |
81
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
82
+ git config --global user.name "GitHub Actions"
83
+ git add README.md dist/
84
+ git commit -m "Update build and README for Hugging Face Space"
85
+ git push https://mantrakp:[email protected]/spaces/mantrakp/sheer main:main