Skip to content

💚 CI: Fixed CODECOV_TOKEN secret variables bug in Azure pipeline #234

💚 CI: Fixed CODECOV_TOKEN secret variables bug in Azure pipeline

💚 CI: Fixed CODECOV_TOKEN secret variables bug in Azure pipeline #234

Workflow file for this run

# Copyright (c) 2019 Abhishek Thakur(@abhiTronix) <abhi.una12@gmail.com>
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: VidGear Docs Deployer
on:
push:
branches:
- testing
- master
release:
types: [published]
env:
PYTHON_VERSION: 3.9
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
GIT_NAME: ${{ secrets.GIT_NAME }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
jobs:
deploy-docs-release:
name: Deploy Release Docs
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: install_vidgear
run: |
python -m pip install --upgrade pip wheel setuptools
pip install .[asyncio]
if: success()
- name: install_dependencies
run: |
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin
pip install -U mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs-git-authors-plugin
pip install jinja2==3.0.*
if: success()
- name: git configure
run: |
REMOTE="https://${GIT_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git config --global user.name "${GIT_NAME}"
git config --global user.email "${GIT_EMAIL}"
git remote set-url origin ${REMOTE}
if: success()
- name: Release name_configure
run: |
echo "RELEASE_NAME=$(python -c 'import vidgear; print(vidgear.__version__)')" >>$GITHUB_ENV
shell: bash
if: success()
- name: mike deploy docs release
run: |
echo "${{ env.NAME_RELEASE }}"
mike deploy --push --update-aliases --alias-type=copy ${{ env.NAME_RELEASE }} ${{ env.RELEASE_NAME }} --title=${{ env.RELEASE_NAME }}
env:
NAME_RELEASE: "v${{ env.RELEASE_NAME }}-release"
if: success()
deploy-docs-stable:
name: Deploy Latest Docs
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: install_vidgear
run: |
python -m pip install --upgrade pip wheel setuptools
pip install .[asyncio]
if: success()
- name: install_dependencies
run: |
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin
pip install -U mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs-git-authors-plugin
pip install jinja2==3.0.*
if: success()
- name: git configure
run: |
REMOTE="https://${GIT_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git config --global user.name "${GIT_NAME}"
git config --global user.email "${GIT_EMAIL}"
git remote set-url origin ${REMOTE}
if: success()
- name: Release name_configure
run: |
echo "RELEASE_NAME=$(python -c 'import vidgear; print(vidgear.__version__)')" >>$GITHUB_ENV
shell: bash
if: success()
- name: mike deploy docs stable
run: |
echo "${{ env.NAME_STABLE }}"
mike deploy --push --update-aliases --alias-type=copy ${{ env.NAME_STABLE }} latest --title=latest
mike set-default --push latest
env:
NAME_STABLE: "v${{ env.RELEASE_NAME }}-stable"
if: success()
deploy-docs-dev:
name: Deploy Development Docs
if: github.event_name == 'push' && github.ref == 'refs/heads/testing'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git checkout testing
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: install_vidgear
run: |
python -m pip install --upgrade pip wheel setuptools
pip install .[asyncio]
if: success()
- name: install_dependencies
run: |
pip install -U mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin
pip install -U mkdocs-exclude mike mkdocstrings mkdocstrings-python-legacy
pip install -U mkdocs-git-authors-plugin
pip install jinja2==3.0.*
if: success()
- name: git configure
run: |
REMOTE="https://${GIT_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git config --global user.name "${GIT_NAME}"
git config --global user.email "${GIT_EMAIL}"
git remote set-url origin ${REMOTE}
if: success()
- name: Release name_configure
run: |
echo "RELEASE_NAME=$(python -c 'import vidgear; print(vidgear.__version__)')" >>$GITHUB_ENV
shell: bash
if: success()
- name: mike deploy docs dev
run: |
echo "Releasing ${{ env.NAME_DEV }}"
mike deploy --push --update-aliases --alias-type=copy ${{ env.NAME_DEV }} dev --title=dev
env:
NAME_DEV: "v${{ env.RELEASE_NAME }}-dev"
if: success()