docs: update README
#4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- closed | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: relekang/python-semantic-release@v7.34.6 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
pypi_token: ${{ secrets.PYPI_TOKEN }} | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2.3.0 | |
with: | |
poetry-version: 1.2.2 | |
- name: Configure Poetry | |
run: | | |
poetry config virtualenvs.in-project true | |
- name: Set up cache | |
uses: actions/cache@v2.1.6 | |
with: | |
path: .venv | |
key: venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Get the release version | |
run: | | |
export RELEASE_TAG_VERSION="$( poetry run semantic-release print-version --current )" | |
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION}" >> $GITHUB_ENV | |
- name: Configure git | |
run: | | |
git config --global user.name Docs deploy | |
git config --global user.email docs@dummy.bot.com | |
- name: Publish the documentation | |
run: | | |
poetry run mike deploy --push --update-aliases ${RELEASE_TAG_VERSION} latest | |
poetry run mike set-default --push latest |