1616 - name : Checkout repository
1717 uses : actions/checkout@v5
1818
19- - name : Checkout json-manifest-reference repository
20- uses : actions/checkout@v5
21- with :
22- repository : contentauth/json-manifest-reference
23- path : ./json-manifest-reference
24-
2519 - name : Checkout c2pa-rs repository
2620 uses : actions/checkout@v5
2721 with :
@@ -46,49 +40,20 @@ jobs:
4640 working-directory : ./c2pa-rs
4741 run : cargo run --bin export_schema
4842
49- - name : Move new schemas into ./json-manifest-reference/_data
50- run : |
51- # We also rename the schemas to have an underscore in the filename instead of a dot to fix
52- # compatibility issues with Ruby/Jekyll.
53- for path in ./c2pa-rs/target/schema/*.schema.json; do
54- name=$(basename "$path")
55- new=${name/.schema/_schema}
56- cp "$path" "./json-manifest-reference/_data/$new"
57- done
43+ - name : Move new schemas into ./static/schemas
44+ run : cp ./c2pa-rs/target/schema/* ./static/schemas/
5845
5946 - name : Check schemas for diff
6047 id : diffs
61- working-directory : ./json-manifest-reference
6248 run : |
63- if [ -n "$(git status --porcelain -- ./_data /)" ]; then
49+ if [ -n "$(git status --porcelain -- ./static/schemas /)" ]; then
6450 echo "diff=true" >> "$GITHUB_OUTPUT"
6551 echo "true"
6652 else
6753 echo "diff=false" >> "$GITHUB_OUTPUT"
6854 echo "false"
6955 fi
7056
71- - name : Install Ruby and build and cache dependencies
72- if : steps.diffs.outputs.diff == 'true'
73- uses : ruby/setup-ruby@v1
74- with :
75- ruby-version : ' 2.7.4'
76- bundler-cache : true
77- working-directory : ./json-manifest-reference
78-
79- - name : Build Jekyll
80- if : steps.diffs.outputs.diff == 'true'
81- working-directory : ./json-manifest-reference
82- run : bundle exec jekyll build
83-
84- - name : Move new built schemas into ./docs/manifest/json-ref
85- if : steps.diffs.outputs.diff == 'true'
86- # TODO: ideally we don't hardcode these paths, but we need to sort out a fix in the docs
87- run : |
88- cp ./json-manifest-reference/_site/manifest-def.html ./docs/manifest/json-ref
89- cp ./json-manifest-reference/_site/reader.html ./docs/manifest/json-ref
90- cp ./json-manifest-reference/_site/settings.html ./docs/manifest/json-ref
91-
9257 - name : Send schema PR
9358 if : steps.diffs.outputs.diff == 'true'
9459 uses : peter-evans/create-pull-request@v7
9762 body : ' Updates schemas to ${{ env.latest_tag }}.'
9863 commit-message : ' docs(schema): update schemas to ${{ env.latest_tag }}'
9964 branch : ' schema-${{ env.latest_tag }}'
100- add-paths : ./docs/manifest/json-ref /*
65+ add-paths : ./static/schemas /*
10166 base : ${{ github.event.repository.default_branch }}
0 commit comments