CI: Add main and pullrequest workflows

This commit is contained in:
Krille 2023-07-14 18:50:39 +09:00
parent 53ca485935
commit 1529b19b58
No known key found for this signature in database
2 changed files with 31 additions and 2 deletions

29
.github/workflows/main_deploy.yaml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Main Deploy Workflow
on:
push:
branches:
- main
jobs:
build_web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: flutter pub get
- name: Prepare web
run: ./scripts/prepare-web.sh
- name: Build Release Web
run: flutter build web --release --verbose --source-maps
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/web
publish_branch: gh-pages

View file

@ -1,6 +1,6 @@
name: Flutter Analyze
name: Pull Request Workflow
on: [push, pull_request]
on: [pull_request]
env:
FLUTTER_VERSION: '3.10.6'