From 3288d2fe4e261477d0ecb05b00ad2f2e469101ad Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 16 Feb 2022 21:35:07 +0300 Subject: [PATCH] .github/workflows/pages.yml: use separate steps for RDF and site This way we can track changes and make commits separately for chan- ges to the RDF files and site content. --- .github/workflows/pages.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 628f20fe..fde0118b 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -20,13 +20,23 @@ jobs: uses: abatilo/actions-poetry@v2.1.4 - name: Install Python dependencies run: poetry install + - name: Generate RDF files + run: | + poetry run ./util/create-rdf.py -i ./data/iseal-core.csv -ns https://iseal-community.github.io/iseal-core# + poetry run ./util/create-rdf.py -i ./data/fsc.csv -ns https://iseal-community.github.io/iseal-core/fsc# + - name: Commit RDF changes + uses: stefanzweifel/git-auto-commit-action@v4 + # Only run if we are on the main branch. We don't want to create extra + # commits on feature branches or pull requests. + if: ${{ github.ref_name == 'main' }} + with: + commit_message: Automated commit with RDF updates + # Only commit if there are changes to the RDF files. + file_pattern: data/rdf/*.ttl - name: Generate Hugo content run: | poetry run ./util/generate-hugo-content.py -i ./data/iseal-core.csv --clean -d poetry run ./util/generate-hugo-content.py -i ./data/fsc.csv -d - - name: Generate RDF - poetry run ./util/create-rdf.py -i ./data/iseal-core.csv -ns https://iseal-community.github.io/iseal-core# - poetry run ./util/create-rdf.py -i ./data/fsc.csv -ns https://iseal-community.github.io/iseal-core/fsc# - name: Setup Hugo uses: peaceiris/actions-hugo@v2 - name: Build Hugo site