mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-16 17:05:17 +00:00
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
name: Deploy Web to Vercel
|
|
on:
|
|
push:
|
|
branches: [develop, main]
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# Cache pub dependencies
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ~/.pub-cache
|
|
key: ${{ runner.os }}-pub-${{ hashFiles('pubspec.yaml') }}
|
|
restore-keys: ${{ runner.os }}-pub-
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
with: { flutter-version: '3.29.2' }
|
|
|
|
# Create .env file for build
|
|
- run: |
|
|
echo "SPOTIFY_SECRETS=dummy_client_id:dummy_client_secret" > .env
|
|
echo "LASTFM_API_KEY=dummy_lastfm_key" >> .env
|
|
echo "LASTFM_API_SECRET=dummy_lastfm_secret" >> .env
|
|
echo "HIDE_DONATIONS=0" >> .env
|
|
echo "ENABLE_UPDATE_CHECK=1" >> .env
|
|
echo "RELEASE_CHANNEL=nightly" >> .env
|
|
echo "DISABLE_SPOTIFY_IMAGES=0" >> .env
|
|
|
|
- run: flutter pub get
|
|
- run: flutter build web --release --dart-define=API_BASE=https://api.tunestream.io
|
|
- run: npm i -g vercel
|
|
# deploy del directorio estático generado por Flutter
|
|
- run: vercel deploy --prod build/web --yes --token ${{ secrets.VERCEL_TOKEN }} --name tunestream-app |