diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index c7fa281..ecacdc7 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -1,9 +1,6 @@ name: build preview on: - release: - types: - - published pull_request: branches: - "*" diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml new file mode 100644 index 0000000..92068eb --- /dev/null +++ b/.github/workflows/release-build.yml @@ -0,0 +1,24 @@ +name: Build preview on documentation repo upon release publish + +on: + release: + types: + - published + +env: + OWNER: nginx + REPO: documentation + +jobs: + trigger-documentation-build: + runs-on: ubuntu-latest + steps: + - name: Trigger 'Build and deploy' workflow in 'documentation' repo + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.DOCUMENTATION_SLACK_FLOW_PAT }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${{ env.OWNER }}/${{ env.REPO }}/dispatches" \ + -d "{\"event_type\": \"trigger-preview-build\", \"client_payload\": {\"environment\": \"preview\", \"hugo_theme_override\": \"\", \"author\": \"${{ github.event.release.author.login }}\", \"tag_name\": \"${{ github.event.release.tag_name }}\", \"release_name\": \"${{ github.event.release.name }}\"}}" \ No newline at end of file