From cd77416b7c92a3405a4c3a2e87b1da7191aaae60 Mon Sep 17 00:00:00 2001 From: Benjamin DENEUX Date: Wed, 11 Jan 2023 11:32:59 +0100 Subject: [PATCH] ci(docs): notify publish draft docs on docs repo --- .github/workflows/update-draft-docs.yml | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/update-draft-docs.yml diff --git a/.github/workflows/update-draft-docs.yml b/.github/workflows/update-draft-docs.yml new file mode 100644 index 00000000..89afafd6 --- /dev/null +++ b/.github/workflows/update-draft-docs.yml @@ -0,0 +1,45 @@ +name: notify-release + +on: + push: + branches: [ main ] + +jobs: + update-docs: + runs-on: ubuntu-22.04 + steps: + - name: Update modules docs repository + uses: fjogeleit/http-request-action@v1 + with: + url: 'https://api.github.com/repos/okp4/docs/actions/workflows/39152549/dispatches' + method: 'POST' + customHeaders: '{"Accept": "application/vnd.github+json", "Authorization": "Bearer ${{ secrets.OKP4_TOKEN }}"}' + data: |- + { + "ref": "main", + "inputs": { + "version": "main", + "repository": "${{github.repository}}", + "section": "modules", + "docs_directory": "docs/proto/*", + "draft": true + } + } + + - name: Update commands docs repository + uses: fjogeleit/http-request-action@v1 + with: + url: 'https://api.github.com/repos/okp4/docs/actions/workflows/39152549/dispatches' + method: 'POST' + customHeaders: '{"Accept": "application/vnd.github+json", "Authorization": "Bearer ${{ secrets.OKP4_TOKEN }}"}' + data: |- + { + "ref": "main", + "inputs": { + "version": "main", + "repository": "${{github.repository}}", + "section": "commands", + "docs_directory": "docs/command/*", + "draft": true + } + }