From 2fc3d74730df4c0d43b232a801096ab65d12165b Mon Sep 17 00:00:00 2001 From: Hugo Bernier Date: Sun, 13 Feb 2022 13:28:08 -0500 Subject: [PATCH] Updated workflov to synch docs --- .github/workflows/merge-sample-json.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge-sample-json.yml b/.github/workflows/merge-sample-json.yml index 61b533229..b3462d4b1 100644 --- a/.github/workflows/merge-sample-json.yml +++ b/.github/workflows/merge-sample-json.yml @@ -23,6 +23,11 @@ jobs: with: ref: gh-pages path: gh-pages + - name: Checkout Docs branch + uses: actions/checkout@v2 + with: + ref: Docs + path: Docs - name: Join samples run: | jq -s '[.[][]]' ./main/samples/**/assets/sample.json > ./main/samples.json @@ -31,11 +36,16 @@ jobs: env: INPUT_SCHEMA: ./main/metadata-schema.json INPUT_JSONS: ./main/samples.json - - name: copy file + - name: copy file to gh-pages uses: canastro/copy-file-action@master with: source: "./main/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 uses: EndBug/add-and-commit@v6 with: @@ -51,3 +61,11 @@ jobs: add: 'samples.json --force' push: true 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 }}