Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,32 @@ jobs:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
JINA_SLACK_WEBHOOK: ${{ secrets.JINA_SLACK_WEBHOOK }}

check-readme-modification:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v34
with:
files: |
README.md

- name: Check if README is modified
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "README.md is modified"
touch SUCCESS

- name: Return outputs
run: |
[[ -f SUCCESS ]]

publish-docarray-org:
needs: check-readme-modification
uses: ./.github/workflows/publish-docarray-org.yml
secrets: inherit
60 changes: 60 additions & 0 deletions .github/workflows/publish-docarray-org.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Manual Publish DocArray[dot]org

on:
workflow_dispatch:
inputs:
release_token:
description: 'Your release token'
required: true
workflow_call:
secrets:
JINA_DEV_BOT:
required: True

# uncomment this line for testing in PR
# push:

jobs:
token-check:
runs-on: ubuntu-latest
steps:
- name: debug
run: |
echo ${{ github.event_name }} event triggered this action
- name: Check release token
id: token-check
run: |
touch SUCCESS
if: inputs.release_token == env.release_token
env:
release_token: ${{ secrets.DOCARRAY_RELEASE_TOKEN }}
- name: Check trigger event
run: |
touch SUCCESS
if: github.event_name == 'pull_request'
- name: Fail release token
run: |
[[ -f SUCCESS ]]

copy-readme:
needs: token-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
path: docarray
- uses: actions/checkout@v3
with:
fetch-depth: 1
repository: docarray/docarray.github.io
path: docarray.github.io
token: ${{ secrets.JINA_DEV_BOT }}
- name: Check out DocArray page
run: |
cd ${GITHUB_WORKSPACE}/docarray.github.io
cp ${GITHUB_WORKSPACE}/docarray/README.md .
git config --local user.email "Jina Dev Bot"
git config --local user.name "[email protected]"
git add README.md && git commit -s -m "chore(docs): sync up README from docarray"
git push
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The following news article card can be easily represented via `docarray.dataclas
<tr>
<td>

<img src="https://github.com/jina-ai/docarray/blob/main/docs/fundamentals/dataclass/img/image-mmdoc-example.png?raw=true" alt="A example multimodal document" width="300px">
<img src="https://github.com/docarray/docarray/blob/main/docs/fundamentals/dataclass/img/image-mmdoc-example.png?raw=true" alt="A example multimodal document" width="300px">

</td>
<td>
Expand Down