diff --git a/.github/workflows/build_docs_on_branch.yml b/.github/workflows/build_docs_on_branch.yml new file mode 100644 index 00000000000..3713226da79 --- /dev/null +++ b/.github/workflows/build_docs_on_branch.yml @@ -0,0 +1,41 @@ +name: BR +## this action is here only for the development phase of docarray v2 +## it will be removed once the new version is released +on: + push: + branches: + - feat-rewrite-v2 + - test-build-doc + +jobs: + + deploy-to-netlify: + runs-on: ubuntu-latest + steps: + - run: | + echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV + - uses: actions/checkout@v2.5.0 + - uses: actions/setup-python@v4 + with: + python-version: 3.7 + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build and Deploy + run: | + npm i -g netlify-cli + python -m pip install --upgrade pip + pip install -r requirements.txt + python -m pip install wheel + python -m pip install poetry + cd .. + python -m poetry config virtualenvs.create false && python -m poetry install --no-interaction --no-ansi --all-extras + + cd docs + export NUM_RELEASES=2 # only 2 last tags to save build time + bash makedoc.sh + netlify deploy --dir=_build/dirhtml --alias="ft-${{ env.BRANCH_NAME }}" --message="Deploying docs to ${{ env.BRANCH_NAME }} branch" + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN1 }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + working-directory: docs diff --git a/.github/workflows/ci_only_pr.yml b/.github/workflows/ci_only_pr.yml index 4bdf72a0d0d..b67a8c0af90 100644 --- a/.github/workflows/ci_only_pr.yml +++ b/.github/workflows/ci_only_pr.yml @@ -1,9 +1,6 @@ name: PR on: - push: - branches: - - feat-rewrite-v2 pull_request: types: [opened, synchronize, reopened] @@ -36,9 +33,6 @@ jobs: - run: | echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV - uses: actions/checkout@v2.5.0 - with: - repository: jina-ai/docarray - ref: ${{ env.BRANCH_NAME }} - uses: actions/setup-python@v4 with: python-version: 3.7 @@ -48,7 +42,6 @@ jobs: - name: Build and Deploy run: | npm i -g netlify-cli - git fetch origin python -m pip install --upgrade pip pip install -r requirements.txt python -m pip install wheel @@ -56,7 +49,6 @@ jobs: cd .. python -m poetry config virtualenvs.create false && python -m poetry install --no-interaction --no-ansi --all-extras - git fetch origin cd docs export NUM_RELEASES=2 # only 2 last tags to save build time bash makedoc.sh