-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (64 loc) · 2.06 KB
/
repo.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
name: Deploy Debian and RPM Repo plus Jekyll homepage
on:
schedule:
- cron: "0 */12 * * *"
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "[REPO] Install required packages"
run: |
until sudo apt update
do
sleep 1
done
sudo apt install -y jq createrepo-c coreutils gnupg2 dpkg-dev
- name: "[REPO] Insert environment variables"
run: |
echo GNUPGHOME="$(mktemp -d /tmp/pgpkeys-XXXXXX)" >> $GITHUB_ENV
echo REPO_OWNER="$(echo "${GITHUB_REPOSITORY}" | cut -d/ -f1)" >> $GITHUB_ENV
echo REPO_NAME="$(echo "${GITHUB_REPOSITORY}" | cut -d/ -f2)" >> $GITHUB_ENV
- name: "[REPO] Import GPG key"
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.PRIVATE_KEY }}
- name: "[JEKYLL] Setup Pages"
uses: actions/configure-pages@v3
- name: "[JEKYLL] Build with Jekyll"
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: "[REPO] Set permissions on the _site directory"
run: sudo chown -R runner:docker _site
- name: "[REPO] Build DEB and RPM Repos"
run: |
export GPG_FINGERPRINT="${{ steps.import_gpg.outputs.fingerprint }}"
export ORIGIN="${{ steps.import_gpg.outputs.name }}"
.github/scripts/build_repos.sh
- name: "[JEKYLL] Upload artifact"
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: "[JEKYLL] Deploy to GitHub Pages"
id: deployment
uses: actions/deploy-pages@v1