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 :
@@ -23,12 +21,21 @@ jobs:
2321 steps :
2422
2523 - name : Setup Node
26- uses : actions/setup-node@v1
24+ uses : actions/setup-node@v4
2725 with :
28- node-version : ' 12.x'
26+ node-version : ' 21.x'
27+ # Install jq if it's not already available
28+ - name : Install jq
29+ run : sudo apt-get install jq
2930
31+ # Fetch the latest commit hash
32+ - name : Get latest commit hash from reproschema-ui
33+ run : |
34+ LATEST_HASH=$(curl -s https://api.github.com/repos/ReproNim/reproschema-ui/commits/main | jq -r '.sha')
35+ echo "CHECKSUM=${LATEST_HASH}" >> "$GITHUB_ENV"
36+
3037 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31- - uses : actions/checkout@v2
38+ - uses : actions/checkout@v4
3239
3340 # Runs a set of commands using the runners shell
3441 - name : Check for syntax errors
@@ -38,10 +45,10 @@ jobs:
3845 grep -r "@context" DemoProtocol | cut -d: -f1 | xargs -I fname jsonlint -q fname
3946
4047 # Validate the protocol
41- - name : Set up Python 3.8
42- uses : actions/setup-python@v2
48+ - name : Set up Python 3.11
49+ uses : actions/setup-python@v5
4350 with :
44- python-version : 3.8
51+ python-version : " 3.11 "
4552 - name : Install dependencies
4653 run : |
4754 python -m pip install --upgrade pip setuptools
6471 touch dist/.nojekyll
6572
6673 - name : Deploy 🚀
67- uses : JamesIves/github-pages-deploy-action@releases/v3
68- if : github.ref == 'refs/heads/master '
74+ uses : JamesIves/github-pages-deploy-action@v4
75+ if : github.ref == 'refs/heads/main '
6976 with :
7077 ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
7178 BRANCH : gh-pages # The branch the action should deploy to.
0 commit comments