Skip to content

Deploy Debian and RPM Repo plus Jekyll homepage #161

Deploy Debian and RPM Repo plus Jekyll homepage

Deploy Debian and RPM Repo plus Jekyll homepage #161

Workflow file for this run

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