diff --git a/.github/workflows/badge-wall.yml b/.github/workflows/badge-wall.yml index 9ad5486..0a2513c 100644 --- a/.github/workflows/badge-wall.yml +++ b/.github/workflows/badge-wall.yml @@ -4,7 +4,7 @@ permissions: contents: read on: - pull_request: + push: branches: [main] schedule: - cron: '0 0 * * 1' # Weekly on Monday @@ -45,6 +45,14 @@ jobs: env: TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Copy PWA files + run: | + cp manifest.json docs/manifest.json + cp wall/badge_generator/templates/service-worker.js docs/service-worker.js + mkdir -p docs/assets + cp assets/icon-192x192.png docs/assets/ + cp assets/icon-512x512.png docs/assets/ + - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/README.md b/README.md index fc42a45..9cd6856 100644 --- a/README.md +++ b/README.md @@ -45,3 +45,13 @@ gh workflow run "Deploy to GitHub Pages" 2. Create a feature branch 3. Make your changes 4. Submit a pull request + +## Installing the PWA on Your Phone + +1. Open the GitHub Workflow Status Wall in your mobile browser. +2. Tap the browser menu (usually three dots or lines in the upper right corner). +3. Select "Add to Home screen" or "Install app". +4. Follow the prompts to add the app to your home screen. +5. The app will now be available on your home screen for quick access. + +Icons from: Brick icons created by max.icons - Flaticon \ No newline at end of file diff --git a/assets/icon-192x192.png b/assets/icon-192x192.png new file mode 100644 index 0000000..f3fea70 Binary files /dev/null and b/assets/icon-192x192.png differ diff --git a/assets/icon-512x512.png b/assets/icon-512x512.png new file mode 100644 index 0000000..9967ac0 Binary files /dev/null and b/assets/icon-512x512.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..763db8b --- /dev/null +++ b/manifest.json @@ -0,0 +1,20 @@ +{ + "name": "GitHub Workflow Status Wall", + "short_name": "Badge Wall", + "start_url": "/", + "display": "standalone", + "background_color": "#f6f8fa", + "theme_color": "#24292e", + "icons": [ + { + "src": "assets/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "assets/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/pyproject.toml b/pyproject.toml index bdbfef9..18a6ff6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "wall" -version = "0.1.0" +version = "0.2.0" description = "GitHub Workflow Status Wall" requires-python = ">=3.8" dependencies = [ diff --git a/wall/badge_generator/templates/base.html b/wall/badge_generator/templates/base.html index 8052912..558eb98 100644 --- a/wall/badge_generator/templates/base.html +++ b/wall/badge_generator/templates/base.html @@ -7,6 +7,18 @@ + + GitHub Workflow Status Wall