Updated for the February release #32
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: Validate FDP and Deploy | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '**/index.html' | |
pull_request: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
validate-rdf: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Safe files as .ttl | |
run: | | |
cp index.html index.ttl | |
cp catalog/index.html catalog/index.ttl | |
cp dataset/20230210/index.html dataset/20230210/index.ttl | |
- name: Validate FDP | |
uses: vemonet/jena-riot-action@v3.14 | |
with: | |
input: index.ttl | |
- name: Validate Catalog | |
uses: vemonet/jena-riot-action@v3.14 | |
with: | |
input: catalog/index.ttl | |
- name: Validate Datasets | |
uses: vemonet/jena-riot-action@v3.14 | |
with: | |
input: dataset/20230210/index.ttl | |
- name: ShEx validation | |
run: | | |
sudo apt install groovy | |
groovy validate.groovy resource.shex http://fairdatapoint.org/ResourceShape index.html http://purl.org/fdp/fdp-o#FairDataPoint | |
groovy validate.groovy catalog.shex http://fairdatapoint.org/CatalogShape index.html http://www.w3.org/ns/dcat#Catalog | |
groovy validate.groovy catalog.shex http://fairdatapoint.org/CatalogShape catalog/index.html http://www.w3.org/ns/dcat#Catalog | |
# Build Jeckyll Website job | |
build: | |
runs-on: ubuntu-latest | |
needs: validate-rdf | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: . | |
destination: ./_site | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
# Jeckyll Website Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
ping: | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Python dependency | |
uses: py-actions/py-dependency-install@v4 | |
with: | |
path: "script/requirements.txt" | |
- name: Ping FDP index | |
id: ping-index | |
working-directory: ./script | |
env: | |
FDP_INDEX_URL: "https://index.vp.ejprarediseases.org/" | |
FDP_URL: "https://fdp.wikipathways.org/" | |
run: 'python ping.py' |