22
33name : CI
44
5- env :
6- CHECKSUM : 8c5ca141a109ed3075b65c1da2691648e7fc8b16
75# Controls when the action will run. Triggers the workflow on push or pull request
86# events but only for the master branch
97on :
108 push :
11- branches : [ master ]
9+ branches : [ main ]
1210 pull_request :
13- branches : [ master ]
11+ branches : [ main ]
1412
1513# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1614jobs :
1715 # This workflow contains a single job called "build"
1816 build :
17+ name : Build UI
1918 # The type of runner that the job will run on
2019 runs-on : ubuntu-latest
2120
2221 # Steps represent a sequence of tasks that will be executed as part of the job
2322 steps :
2423
2524 - name : Setup Node
26- uses : actions/setup-node@v1
25+ uses : actions/setup-node@v4
2726 with :
28- node-version : ' 12.x'
27+ node-version : ' 21.x'
28+ # Install jq if it's not already available
29+ - name : Install jq
30+ run : sudo apt-get install jq
2931
32+ # Fetch the latest commit hash
33+ - name : Get latest commit hash from reproschema-ui
34+ run : |
35+ LATEST_HASH=$(curl -s https://api.github.com/repos/ReproNim/reproschema-ui/commits/main | jq -r '.sha')
36+ echo "CHECKSUM=${LATEST_HASH}" >> "$GITHUB_ENV"
37+
3038 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31- - uses : actions/checkout@v2
39+ - uses : actions/checkout@v4
3240
3341 # Runs a set of commands using the runners shell
3442 - name : Check for syntax errors
@@ -38,15 +46,15 @@ jobs:
3846 grep -r "@context" DemoProtocol | cut -d: -f1 | xargs -I fname jsonlint -q fname
3947
4048 # Validate the protocol
41- - name : Set up Python 3.8
42- uses : actions/setup-python@v2
49+ - name : Set up Python 3.11
50+ uses : actions/setup-python@v5
4351 with :
44- python-version : 3.8
52+ python-version : " 3.11 "
4553 - name : Install dependencies
4654 run : |
4755 python -m pip install --upgrade pip setuptools
4856 pip install reproschema requests_cache pre-commit
49- - name : Test with pyshacl
57+ - name : Validate with reproschema
5058 run : |
5159 reproschema -l DEBUG validate activities
5260 reproschema -l DEBUG validate DemoProtocol/DemoProtocol_schema
6472 touch dist/.nojekyll
6573
6674 - name : Deploy 🚀
67- uses : JamesIves/github-pages-deploy-action@releases/v3
68- if : github.ref == 'refs/heads/master '
75+ uses : JamesIves/github-pages-deploy-action@v4
76+ if : github.ref == 'refs/heads/main '
6977 with :
7078 ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
7179 BRANCH : gh-pages # The branch the action should deploy to.
0 commit comments