From 119d55160f57e1c890f8f97d88322e033b14acd2 Mon Sep 17 00:00:00 2001 From: Artem Sorokin Date: Tue, 25 Jul 2023 13:01:03 +0300 Subject: [PATCH] CI: Add docs deployment --- .github/workflows/docs.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..fc1b4932 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,34 @@ +name: Deploy docs + +on: + push: + branches: + - v* + - master + +permissions: + contents: write + +jobs: + docs: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: pip + cache-dependency-path: requirements_dev.txt + + - name: Install dependencies + run: pip install -r requirements_dev.txt + + - name: Deploy docs + run: | + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git fetch + echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct docs mkdocs.yml)" >> "${GITHUB_ENV}" + mike deploy --push --branch gh-pages ${GITHUB_REF_NAME}