-
Notifications
You must be signed in to change notification settings - Fork 3
104 lines (84 loc) · 2.6 KB
/
build-pages.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
name: "Build pages"
on:
push:
branches:
- main
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: ⬇ Checkout
uses: actions/checkout@v3
- name: 🔑 Configure GPG key
run: |
echo -n "$GPG_SIGNING_KEY" | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: 🏗 Install apt-utils
run: |
sudo apt-get -y install apt-utils
- name: 🏗 Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: 📦 Cache apt-ftparchive db
uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-apt-ftparchive
- name: 🏗 Prepare folders
run: |
mkdir -p cache
mkdir -p public/debian
cp -ar pool public/debian
- name: ✍ Generate repository files
env:
DISTS: bullseye
COMPONENTS: rpi
ARCHS: binary-armhf binary-arm64
run: |
repo="public/debian/dists"
# prepare directory structure
for dist in $DISTS; do
for component in $COMPONENTS; do
for arch in $ARCHS; do
mkdir -p $repo/$dist/$component/$arch
done
done
done
# generate repo
apt-ftparchive generate apt-ftparchive.conf
# generate signed & unsigned Release files
for dist in $DISTS; do
apt-ftparchive -c $dist.conf release $repo/$dist > $repo/$dist/Release
gpg --default-key "[email protected]" -abs -o - $repo/$dist/Release > $repo/$dist/Release.gpg
gpg --default-key "[email protected]" --clearsign -o - $repo/$dist/Release > $repo/$dist/InRelease
done
tree public
- name: ✍ Generate Directory Listings
run: |
curl https://raw.githubusercontent.com/paperbenni/apindex/master/install.sh | bash
cd public
apindex debian
- name: ⬆ Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
deploy:
name: "Deploy"
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1