static.yml

 1# Simple workflow for deploying static content to GitHub Pages
 2name: Deploy static content to Pages
 3
 4on:
 5  # Runs on pushes targeting the default branch
 6  push:
 7    branches: ["master"]
 8  # ALSO run when a new GitHub Release is published
 9  release:
10    types: [published]
11  # Allows you to run this workflow manually from the Actions tab
12  workflow_dispatch:
13
14# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15permissions:
16  contents: read
17  pages: write
18  id-token: write
19
20# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22concurrency:
23  group: "pages"
24  cancel-in-progress: false
25
26jobs:
27  # Single deploy job since we're just deploying
28  deploy:
29    environment:
30      name: github-pages
31      url: ${{ steps.deployment.outputs.page_url }}
32    runs-on: ubuntu-latest
33    steps:
34      - name: Checkout
35        uses: actions/checkout@v6
36
37      - name: Install Flatpak Builder
38        run: |
39          sudo apt-get update
40          sudo apt-get install -y flatpak flatpak-builder
41          flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
42
43      - name: Build Flatpak Repo
44        run: |
45          flatpak-builder --user --install-deps-from=flathub --repo=public/repo --force-clean build-dir com.floatpane.matcha.yaml
46          flatpak build-update-repo --generate-static-deltas public/repo
47
48      - name: Setup Pages
49        uses: actions/configure-pages@v6
50
51      - name: Upload artifact
52        uses: actions/upload-pages-artifact@v5
53        with:
54          # Upload entire repository
55          path: "public"
56
57      - name: Deploy to GitHub Pages
58        id: deployment
59        uses: actions/deploy-pages@v5