|
name: Sync to Hugging Face hub |
|
|
|
on: |
|
push: |
|
branches: [main] |
|
|
|
workflow_dispatch: |
|
|
|
jobs: |
|
build-and-sync-to-hub: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout code |
|
uses: actions/checkout@v3 |
|
with: |
|
fetch-depth: 0 |
|
lfs: true |
|
|
|
- name: Setup Bun |
|
uses: oven-sh/setup-bun@v1 |
|
with: |
|
bun-version: latest |
|
|
|
- name: Install dependencies |
|
run: bun install |
|
|
|
- name: Build app |
|
run: bun run build |
|
|
|
- name: Update README for Hugging Face Space |
|
run: | |
|
cat > README.md << 'EOL' |
|
--- |
|
title: Sheer |
|
emoji: π |
|
colorFrom: indigo |
|
colorTo: purple |
|
sdk: static |
|
pinned: true |
|
--- |
|
|
|
|
|
|
|
|
|
|
|
This Space showcases a modern React application built with Bun and Vite. It demonstrates the power of modern web technologies combined with seamless deployment. |
|
|
|
|
|
|
|
- Fast and responsive UI built with React and Tailwind CSS |
|
- Optimized build process using Bun and Vite |
|
- Modern development experience with TypeScript |
|
- Comprehensive UI component library |
|
|
|
|
|
|
|
Simply explore the application in this Space! The app is statically hosted and ready to use. |
|
|
|
|
|
|
|
- React 19 |
|
- Bun |
|
- Vite |
|
- TypeScript |
|
- Tailwind CSS |
|
- Radix UI Components |
|
|
|
|
|
|
|
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. |
|
|
|
|
|
|
|
See LICENSE file for details. |
|
EOL |
|
|
|
- name: Prepare for Hugging Face |
|
run: | |
|
# Create a .gitignore specifically for the HF Space |
|
echo "node_modules/" > .hugginface.gitignore |
|
# Move the dist content to a directory that's not ignored |
|
mkdir -p static |
|
cp -r dist/* static/ |
|
|
|
- name: Push to Hugging Face Hub |
|
env: |
|
HF_TOKEN: ${{ secrets.HF_TOKEN }} |
|
run: | |
|
git config --global user.email "github-actions[bot]@users.noreply.github.com" |
|
git config --global user.name "GitHub Actions" |
|
git add README.md static/ |
|
git commit -m "Update build and README for Hugging Face Space" |
|
git push https://mantrakp:[email protected]/spaces/mantrakp/sheer main:main |