From 1529b19b5837e83023c31161ac55eb6747c43091 Mon Sep 17 00:00:00 2001 From: Krille Date: Fri, 14 Jul 2023 18:50:39 +0900 Subject: [PATCH] CI: Add main and pullrequest workflows --- .github/workflows/main_deploy.yaml | 29 +++++++++++++++++++ .../{analyze.yaml => pull_request.yaml} | 4 +-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main_deploy.yaml rename .github/workflows/{analyze.yaml => pull_request.yaml} (97%) diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml new file mode 100644 index 000000000..1e4489d54 --- /dev/null +++ b/.github/workflows/main_deploy.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/analyze.yaml b/.github/workflows/pull_request.yaml similarity index 97% rename from .github/workflows/analyze.yaml rename to .github/workflows/pull_request.yaml index e8b9a867e..6f04593d1 100644 --- a/.github/workflows/analyze.yaml +++ b/.github/workflows/pull_request.yaml @@ -1,6 +1,6 @@ -name: Flutter Analyze +name: Pull Request Workflow -on: [push, pull_request] +on: [pull_request] env: FLUTTER_VERSION: '3.10.6'