🔀 Merge pull request #271 from AssistantNMS/develop #10
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: Flutter Deploy - Web | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: ['main'] | |
jobs: | |
build: | |
runs-on: windows-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' # 'stable', 'beta', 'dev' or 'master' | |
- name: Write env file | |
env: | |
ENV_DART: ${{ secrets.ENV_DART }} | |
run: | | |
$Env:ENV_DART | Out-File ./lib/env.dart | |
- name: Enable web | |
run: flutter config --enable-web | |
- name: Build Web release version | |
run: flutter build web -t lib/prod.dart --release | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'build/web' | |
- name: Deploy GitHub Pages site | |
uses: actions/[email protected] |