update readme #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
# Build docs job | |
docs: | |
runs-on: ubuntu-latest | |
env: | |
MDBOOK_VERSION: 0.4.37 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-binstall | |
uses: cargo-bins/[email protected] | |
- name: Install dependencies | |
run: | | |
cargo binstall --no-confirm --version ${MDBOOK_VERSION} mdbook | |
cargo binstall --no-confirm mdbook-admonish mdbook-catppuccin | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
- name: Build with mdBook | |
run: mdbook build | |
# - name: Upload artifact | |
# uses: actions/upload-pages-artifact@v3 | |
# with: | |
# path: ./book | |
- name: Archive book | |
uses: actions/upload-artifact@v4 | |
with: | |
name: book | |
path: "./book" | |
flatpak: | |
name: Flatter | |
runs-on: ubuntu-latest | |
env: | |
MDBOOK_VERSION: 0.4.37 | |
GNOME_VERSION: 45 | |
container: | |
image: ghcr.io/andyholmes/flatter/gnome:45 | |
options: --privileged | |
strategy: | |
matrix: | |
arch: [x86_64 ] # , aarch64] | |
fail-fast: false | |
# Only one job at a time can use the shared repository cache | |
max-parallel: 1 | |
steps: | |
# Checkout a repository with Flatpak manifests | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# See "Multiple Architectures" below | |
- name: Setup QEMU | |
if: ${{ matrix.arch == 'aarch64' }} | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Install system dependencies | |
run: | | |
dnf install -y \ | |
gtk4-devel \ | |
libadwaita-devel \ | |
libpanel-devel \ | |
vte291-gtk4-devel | |
- name: Install flatpak dependencies | |
run: flatpak install -y org.gnome.Sdk/${{ matrix.arch }}/${GNOME_VERSION} org.freedesktop.Sdk.Extension.rust-stable/${{ matrix.arch }}/23.08 org.gnome.Platform/${{ matrix.arch }}/${GNOME_VERSION} org.freedesktop.Sdk.Extension.llvm16/${{ matrix.arch }}/23.08 | |
- name: Setup GPG | |
id: gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Build | |
uses: andyholmes/flatter@main | |
id: flatpak-build | |
with: | |
files: | | |
build-aux/io.github.vhdirk.Terms.yml | |
arch: ${{ matrix.arch }} | |
gpg-sign: ${{ steps.gpg.outputs.fingerprint }} | |
upload-bundles: true | |
- name: Archive flatpak repo | |
uses: actions/upload-artifact@v4 | |
if: ${{ matrix.arch == 'x86_64' }} | |
with: | |
name: repo | |
path: ${{ steps.flatpak-build.outputs.repository }} | |
deploy: | |
needs: | |
- flatpak | |
- docs | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Merge artifacts | |
run: | | |
mv repo book | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./book | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |