From b974dcc02f1834abeae5d0963272fbc9928e0158 Mon Sep 17 00:00:00 2001 From: Ales Musil Date: Tue, 3 Sep 2024 08:35:36 +0200 Subject: [PATCH] ci: Make sure that we push all documentation changes Unfortunately the automatic job trigger doesn't work when the GITHUB_TOKEN is used [0]. Add action that will trigger the publish action via gh cli tool. [0] https://github.com/orgs/community/discussions/25702 Signed-off-by: Ales Musil --- .github/workflows/dist-docs.yml | 15 +++++++++++++++ .github/workflows/publish.yml | 1 + 2 files changed, 16 insertions(+) diff --git a/.github/workflows/dist-docs.yml b/.github/workflows/dist-docs.yml index 45413c77..eb86ac5e 100644 --- a/.github/workflows/dist-docs.yml +++ b/.github/workflows/dist-docs.yml @@ -117,3 +117,18 @@ jobs: with: name: dist-docs-${{ join(matrix.*, '-') }} path: /tmp/dist-docs.tgz + + push-changes: + if: github.repository_owner == 'ovn-org' && github.ref_name == 'main' + name: Push changes + runs-on: ubuntu-latest + needs: [build-linux] + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + - name: checkout ovn-website + uses: actions/checkout@v4 + + - name: Trigger publish + run: gh workflow run publish.yml --ref main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6934b445..96ac2968 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,7 @@ name: publish-push on: + workflow_dispatch: push: branches: - main