From 66331f819e62a40b1bbcf3dfa8bab0747006fa3e Mon Sep 17 00:00:00 2001 From: emanuel-quix <124801336+emanuel-quix@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:50:36 +0100 Subject: [PATCH] trigger quix docs build (#43) --- .github/workflows/trigger-quix-docs.yml | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/trigger-quix-docs.yml diff --git a/.github/workflows/trigger-quix-docs.yml b/.github/workflows/trigger-quix-docs.yml new file mode 100644 index 0000000..8e2a455 --- /dev/null +++ b/.github/workflows/trigger-quix-docs.yml @@ -0,0 +1,29 @@ +name: Trigger Quix docs build + +on: + push: + paths: + - 'docs/**' + branches: + - main + +jobs: + trigger: + runs-on: ubuntu-latest + steps: + - name: Trigger Quix docs build + env: + REPO: 'quixio/quix-docs' + PAT: ${{ secrets.QUIX_DOCS_PAT }} + run: | + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -X POST \ + -H "Authorization: token $PAT" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/$REPO/dispatches \ + -d '{"event_type":"cli_docs_updated"}') + if [ "$RESPONSE" -eq 204 ]; then + echo "Dispatch event sent successfully." + else + echo "Failed to send dispatch event. Response code: $RESPONSE" + exit 1 + fi