Skip to content

Commit

Permalink
Fix ontology deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
nck-mlcnv committed Jul 29, 2024
1 parent 0930eaa commit 44c1177
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
java-version: '22'
cache: 'maven'
- name: 'Compile native-binary'
run: 'mvn -Dagent=true -Pnative package'
Expand Down Expand Up @@ -89,9 +89,25 @@ jobs:
- run: mvn javadoc:javadoc

- name: Find Ontology Version
run: echo "$(grep 'versionIRI' iguana.owx | grep -Po '[0-9]+.[0-9]+.[0-9]+')"
run: echo "ONTOLOGY_VERSION=$(grep 'versionIRI' iguana.owx | grep -Po '[0-9]+.[0-9]+.[0-9]+')" >> $GITHUB_OUTPUT
id: find_ontology_version

- name: Fetch Ontologies
uses: actions/checkout@v4
with:
ref: gh-pages
sparse-checkout: ontology
- run: mkdir ontology/${{ steps.find_ontology_version.outputs.ONTOLOGY_VERSION }}
- run: cp schema/iguana.owx ontology/${{ steps.find_ontology_version.outputs.ONTOLOGY_VERSION }}/iguana.owx
- run: cp schema/iguana.owx ontology/iguana.owx

- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: 'ontology'
path: 'ontology/'
if-no-files-found: error

- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,20 @@ jobs:
run: echo "ONTOLOGY_VERSION=$(grep 'versionIRI' iguana.owx | grep -Po '[0-9]+.[0-9]+.[0-9]+')" >> $GITHUB_OUTPUT
id: find_ontology_version

- name: Deploy Ontology
uses: peaceiris/actions-gh-pages@v3
- name: Fetch Ontologies
uses: actions/checkout@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./schema/
destination_dir: ./ontology/${{ steps.find_ontology_version.outputs.ONTOLOGY_VERSION }}/
ref: gh-pages
sparse-checkout: ontology
- run: mkdir ontology/${{ steps.find_ontology_version.outputs.ONTOLOGY_VERSION }}
- run: cp schema/iguana.owx ontology/${{ steps.find_ontology_version.outputs.ONTOLOGY_VERSION }}/iguana.owx
- run: cp schema/iguana.owx ontology/iguana.owx

- name: Deploy Ontology
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./schema/
publish_dir: ./ontology/
destination_dir: ./ontology/


Expand Down

0 comments on commit 44c1177

Please sign in to comment.