.github/workflows/build-and-verify.yml #322
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
on: | |
push: null | |
schedule: | |
- cron: "12 3 * * *" | |
jobs: | |
build-und-verify: | |
name: Build and Verify | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: True | |
- name: Install dependencies | |
run: sudo apt-get install --yes --quiet codespell git hugo jq libpod-markdown-perl make perl-doc python3-aiohttp python3-flake8 python3-yaml | |
# The gallery requires at least hugo 0.73 due to changes regarding taxonomies and terms. | |
# This means at least Debian Buster or Ubuntu Hirsute (21.04) is required. | |
# But sadly this is a bit complicated: | |
# - Debian Bullseye: Debian is not supported by github actions (at least not in 2022) | |
# - Ubuntu Hirsute: works, but it was removed from the Ubuntu mirrors in January 2022 | |
# - Ubuntu Impish: the hugo package requires a newer libc version (compared to Ubuntu Focal) | |
# The solution is a bit dirty: use Ubuntu Focal as the base image and install the hugo | |
# package from Debian Bullseye (shipping the same version of libc). | |
- name: Build website and metadata | |
run: | | |
mkdir -p build | |
./plugin-gallery-generator --show-metadata build >build/metadata.yml | |
- name: Analyze the code and spelling | |
run: make lint | |
- name: Upload static website | |
uses: actions/upload-artifact@v2 | |
with: | |
name: website | |
path: hugo-base/public | |
- name: Upload metadata | |
uses: actions/upload-artifact@v2 | |
with: | |
name: metadata | |
path: build/metadata.yml |