Add workflow job to validate PaNET_metadata.ttl (#146) #11
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: panet-build | |
on: | |
push: | |
branches: [ '*' ] | |
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Validate PaNET_metadata.ttl | |
uses: vemonet/[email protected] | |
with: | |
input: source/PaNET_metadata.ttl | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: gitlab.desy.de:5555/paul.millar/panet-build:v0.5 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Needed to identify non-tagged builds | |
- name: Work-around for broken support for safe.directory | |
run: /usr/bin/git config --global --add safe.directory `pwd` | |
- name: Build PaNET and documentation | |
run: /bin/build-panet | |
- name: Archive generated PaNET | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PaNET | |
path: | | |
source/PaNET.owl | |
source/PaNET_reasoned.owl | |
retention-days: 7 | |
- name: Upload documentation as artifact | |
id: upload-docs-artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: widoco/ | |
retention-days: 7 | |
deploy: | |
# From naming convention on above tag selection, tags | |
# only trigger the workflow if they are releases. | |
if: ${{ github.ref_type == 'tag' }} | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |