Release v1.1.0 #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: Build web | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "README.md" | |
- "linux/**" | |
- "windows/**" | |
- ".github/**" | |
- "test/**" | |
permissions: | |
contents: write | |
jobs: | |
build-web: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.22.2" | |
channel: "stable" | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
path: source | |
ref: main | |
- name: Checkout GitHub Pages branch | |
uses: actions/checkout@v4 | |
with: | |
path: target | |
ref: gh-pages | |
- name: Remove files in GiHub Pages branch | |
run: rm -rvf $GITHUB_WORKSPACE/target/* | |
- name: Build | |
working-directory: ${{ github.workspace }}/source | |
run: | | |
flutter pub get | |
flutter build web --web-renderer html --output $GITHUB_WORKSPACE/target --base-href "/MK8SE/" | |
- name: Push changes | |
working-directory: ${{ github.workspace }}/target | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Build web version" | |
git push |