From b12334e418d729f832777d532e2ae0717f4d91ba Mon Sep 17 00:00:00 2001 From: thaihuynhxyz Date: Tue, 10 Mar 2026 15:00:22 +0700 Subject: [PATCH] Add GitHub Pages deployment to CI workflow - Build and deploy to Pages on push to master - Add CNAME for amlich.demen.org custom domain - Update web/index.html with app title and Google Analytics Made-with: Cursor --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++++++++++- web/index.html | 15 ++++++++++++--- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c0becc..4e349b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,15 @@ on: pull_request: branches: [master] +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + jobs: build: runs-on: ubuntu-latest @@ -30,4 +39,28 @@ jobs: run: flutter test - name: Build web - run: flutter build web + run: flutter build web --release --base-href / + + - name: Add CNAME + if: github.ref == 'refs/heads/master' + run: echo "amlich.demen.org" > build/web/CNAME + + - name: Upload Pages artifact + if: github.ref == 'refs/heads/master' + uses: actions/upload-pages-artifact@v3 + with: + path: build/web + + deploy: + if: github.ref == 'refs/heads/master' + needs: build + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/web/index.html b/web/index.html index c29a13f..d1c7551 100644 --- a/web/index.html +++ b/web/index.html @@ -18,18 +18,27 @@ - + - + - licham + Âm Lịch + + + +