df
This commit is contained in:
38
.gitea/workflows/deploy.yml
Normal file
38
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Deploy to Cloudflare Pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # O il nome del tuo branch principale
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest # O il runner configurato sul tuo Gitea
|
||||
steps:
|
||||
- name: Checkout del codice
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
|
||||
- name: Crea il file .env per flutter_dotenv
|
||||
run: |
|
||||
echo "SUPABASE_URL=${{ secrets.SUPABASE_URL }}" >> .env
|
||||
echo "SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }}" >> .env
|
||||
|
||||
- name: Ottieni le dipendenze
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compila per il Web
|
||||
run: flutter build web --release
|
||||
|
||||
- name: Crea file _redirects per Cloudflare
|
||||
run: echo "/* /index.html 200" > build/web/_redirects
|
||||
|
||||
- name: Deploy su Cloudflare Pages
|
||||
env:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
# QUESTA È LA RIGA MAGICA: Gli diciamo di prendere SOLO la cartella build/web
|
||||
run: npx wrangler@latest pages deploy build/web --project-name Flux --branch main
|
||||
Reference in New Issue
Block a user