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 @@ - + - + -