[CHORE] bump flutter version (#79) #116
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
concurrency: | |
group: "deploy" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
- name: cache flutter | |
uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-${{ hashFiles('**/.fvm/fvm_config.json') }} | |
path: .fvm/cache | |
- name: add brew to $PATH | |
run: | | |
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH | |
- name: fvm install | |
run: | | |
brew tap leoafarias/fvm | |
brew install fvm | |
- name: flutter install | |
run: | | |
fvm config --cache-path .fvm/cache | |
fvm install | |
- name: update base_url | |
working-directory: 'example/web' | |
run: | | |
sed -i 's,base_url,https://flutter-seo.netlify.app,g' robots.txt | |
sed -i 's,base_url,https://flutter-seo.netlify.app,g' sitemap.xml | |
- name: flutter build | |
run: | | |
cd example | |
fvm config --cache-path ../.fvm/cache | |
fvm flutter pub get | |
fvm flutter build web --release --web-renderer auto | |
- name: deploy to netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: 'example/build/web' | |
production-deploy: true | |
deploy-message: "Deploy from GitHub Actions" | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |