-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (57 loc) · 1.95 KB
/
compile-manifest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: compile-manifest
on:
# push:
# branches: [master]
pull_request:
# branches: [master]
jobs:
build-manifest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
wget https://raw.githubusercontent.com/bioimage-io/bioimage-io-models/master/requirements.txt
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ruamel.yaml
- name: Compile manifest file
run: |
wget https://raw.githubusercontent.com/bioimage-io/bioimage-io-models/master/utils/compile_model_manifest.py
python compile_model_manifest.py
- name: Save build output
uses: actions/upload-artifact@v1
with:
name: built-output
path: ./
- name: validate collection
run: bioimageio validate manifest.bioimage.io.yaml
deploy:
runs-on: ubuntu-latest
needs: build-manifest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Load saved build output
uses: actions/download-artifact@v1
with:
name: built-output
path: ./output
- run: |
mkdir ./dist
mv ./output/manifest.bioimage.io.json ./dist
- name: Deploy the manifest JSON file
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: ./dist