Spaces:
Sleeping
Sleeping
setup huggingface refactor deployment
Browse filesFiles changed (2)
- .github/workflows/deploy-huggingface.ymlAdded+24
- DockerfileAdded+28
123456789101112131415161718192021222324name: Deploy Refactor to Hugging Face
on: push: branches: [refactor] workflow_dispatch:
jobs: deploy: runs-on: ubuntu-latest
steps: - name: Checkout refactor branch uses: actions/checkout@v4 with: ref: refactor fetch-depth: 0
- name: Push to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git remote add hf https://huggingface.co/spaces/wepee/CAPS04-FE-REFACTOR git push hf refactor:main --force12345678910111213141516171819202122232425262728FROM php:8.3-cli
RUN apt-get update && apt-get install -y \ git unzip curl libzip-dev zip \ && docker-php-ext-install zip pdo pdo_mysql
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app
COPY . .
RUN composer install --no-dev --optimize-autoloader
RUN if [ -f package.json ]; then \ curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ apt-get install -y nodejs && \ npm install && \ npm run build; \ fi
RUN php artisan config:clear || trueRUN php artisan route:clear || trueRUN php artisan view:clear || true
EXPOSE 7860
CMD php artisan serve --host=0.0.0.0 --port=7860.github/workflows/deploy-huggingface.ymlAdded+24
DockerfileAdded+28