-
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (122 loc) · 3.81 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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