Merge pull request #220 from FlutterKaigi/feature/session_video #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Github pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch flutter config | |
uses: kuhnroyal/flutter-fvm-config-action@v1 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
channel: ${{ env.FLUTTER_CHANNEL }} | |
cache: true | |
- name: Install dependencies | |
run: | | |
flutter pub get | |
- name: create .env | |
run: | | |
touch .env | |
echo NEWT_CDN_API_TOKEN=${{secrets.NEWT_CDN_API_TOKEN}} >> .env | |
- name: Transpile | |
run: | | |
flutter build web \ | |
--web-renderer html \ | |
--dart-define-from-file flavor/production.json \ | |
--base-href "/2023/" \ | |
--release | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/web |