Skip to content

Commit

Permalink
Update workflows for web-content (#638)
Browse files Browse the repository at this point in the history
Update web-content repo url and add docs update event

Web-content is the repo where to store docs data with different versions.

Any modifies under `docs/` should dispatch event action to web-content for consistent update.

Signed-off-by: czhen <[email protected]>
  • Loading branch information
Zhen Chen authored Aug 17, 2021
1 parent 1f4bc4a commit b1d075e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/doc_update_event.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: web-content - Dispatch event after docs files updated

on:
push:
branches-ignore:
- 'master'
- '1.*'
paths:
- 'docs/**'

jobs:
dispatch_event:
name: Dispatch event
runs-on: ubuntu-latest
steps:
- id: extract_branch
name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- id: dispatch_branch_name
name: Dispatch branch name if update any docs
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/milvus-io/web-content/actions/workflows/updateApiByBranchEvent.yml/dispatches" \
-d '{"ref":"master", "inputs": { "branchName": "${{ steps.extract_branch.outputs.branch }}", "repoName": "${{ github.event.repository.name }}" } }' \
-u ".:${{secrets.DOC_TOKEN}}"
4 changes: 2 additions & 2 deletions .github/workflows/release_event.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: dispatch new release event
name: web-content - Dispatch new release event
on:
release:
types: [published]
Expand All @@ -18,6 +18,6 @@ jobs:
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/milvus-io/docs/actions/workflows/updateApiReference.yml/dispatches" \
"https://api.github.com/repos/milvus-io/web-content/actions/workflows/updateApiReference.yml/dispatches" \
-d '{"ref":"master", "inputs": { "tagName": "${{ steps.tag_name.outputs.SOURCE_TAG }}", "repoName": "${{ github.event.repository.name }}" } }' \
-u ".:${{secrets.DOC_TOKEN}}"

0 comments on commit b1d075e

Please sign in to comment.