From ba4ea5ecf70477ed2d745448183b1ff4e87e98d2 Mon Sep 17 00:00:00 2001 From: PartyDonut Date: Thu, 17 Oct 2024 19:28:57 +0200 Subject: [PATCH] Separated pages and release web build --- .github/workflows/build.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb3199a..9567118 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -265,7 +265,7 @@ jobs: VERSION_NAME=$(grep '^version:' pubspec.yaml | cut -d ':' -f2 | cut -d '+' -f1 | tr -d ' ') echo "PACKAGE_NAME=$APP_NAME-Web-$VERSION_NAME" >> $GITHUB_ENV - flutter build web --base-href /${{ github.event.repository.name }}/ --release --build-number=$GITHUB_RUN_NUMBER + flutter build web --release --build-number=$GITHUB_RUN_NUMBER - name: Archive web artifact uses: actions/upload-artifact@v4.0.0 @@ -273,12 +273,6 @@ jobs: name: ${{ env.PACKAGE_NAME }} path: build/web - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions - publish_dir: ./build/web - - name: Deploy to ghcr.io uses: mr-smithers-excellent/docker-build-push@v6 with: @@ -286,3 +280,14 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Github pages web + run: flutter build web --base-href /${{ github.event.repository.name }}/ --release --build-number=$GITHUB_RUN_NUMBER + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions + publish_dir: ./build/web + +