Generate github pages #11269
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
name: Generate github pages | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0-5 0-1 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/fedora/fedora:36 | |
steps: | |
- name: Install dependencies | |
run: | | |
dnf install -y \ | |
git \ | |
python3-copr \ | |
python3-hawkey \ | |
python3-jinja2 \ | |
python3-koji | |
- name: Fetch sources | |
uses: actions/checkout@v3 | |
- name: Generate HTML | |
run: | | |
# Work around https://github.com/actions/checkout/issues/760 | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
git config --global user.email "[email protected]" | |
git config --global user.name "Github Pages" | |
python3 update.py | |
mkdir html | |
mv *.html html/ | |
git fetch origin gh-pages | |
git checkout gh-pages | |
mv html/*.html . | |
git add *.html | |
git commit -a -m "Update pages" | |
git push origin gh-pages:gh-pages |