Updated workflov to synch docs
This commit is contained in:
parent
dc4f21ae0a
commit
2fc3d74730
|
@ -23,6 +23,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ref: gh-pages
|
ref: gh-pages
|
||||||
path: gh-pages
|
path: gh-pages
|
||||||
|
- name: Checkout Docs branch
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: Docs
|
||||||
|
path: Docs
|
||||||
- name: Join samples
|
- name: Join samples
|
||||||
run: |
|
run: |
|
||||||
jq -s '[.[][]]' ./main/samples/**/assets/sample.json > ./main/samples.json
|
jq -s '[.[][]]' ./main/samples/**/assets/sample.json > ./main/samples.json
|
||||||
|
@ -31,11 +36,16 @@ jobs:
|
||||||
env:
|
env:
|
||||||
INPUT_SCHEMA: ./main/metadata-schema.json
|
INPUT_SCHEMA: ./main/metadata-schema.json
|
||||||
INPUT_JSONS: ./main/samples.json
|
INPUT_JSONS: ./main/samples.json
|
||||||
- name: copy file
|
- name: copy file to gh-pages
|
||||||
uses: canastro/copy-file-action@master
|
uses: canastro/copy-file-action@master
|
||||||
with:
|
with:
|
||||||
source: "./main/samples.json"
|
source: "./main/samples.json"
|
||||||
target: "./gh-pages/samples.json"
|
target: "./gh-pages/samples.json"
|
||||||
|
- name: copy file to Docs
|
||||||
|
uses: canastro/copy-file-action@master
|
||||||
|
with:
|
||||||
|
source: "./main/samples.json"
|
||||||
|
target: "./Docs/docs/samples.json"
|
||||||
- name: Commit updated samples.json
|
- name: Commit updated samples.json
|
||||||
uses: EndBug/add-and-commit@v6
|
uses: EndBug/add-and-commit@v6
|
||||||
with:
|
with:
|
||||||
|
@ -51,3 +61,11 @@ jobs:
|
||||||
add: 'samples.json --force'
|
add: 'samples.json --force'
|
||||||
push: true
|
push: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Commit samples.json to Docs
|
||||||
|
uses: EndBug/add-and-commit@v6
|
||||||
|
with:
|
||||||
|
cwd: ./Docs
|
||||||
|
branch: Docs
|
||||||
|
add: 'docs/samples.json --force'
|
||||||
|
push: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in New Issue