Skip to content

Commit

Permalink
Updated docs to build and manage and show version based github pages …
Browse files Browse the repository at this point in the history
…docs
  • Loading branch information
arnav13081994 authored and jleclanche committed Dec 24, 2021
1 parent b658278 commit 145d809
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ name: Build and deploy docs

on:
push:
branches: [master]
branches:
- "master"
# Push events to branches matching
# refs/heads/stable/2.5
# refs/heads/stable/10
# refs/heads/stable/2
# refs/heads/stable/2.5.6
- "stable/[0-9]+(.[0-9])*(.[0-9])*"

workflow_dispatch: # to trigger manually

env:
POETRY_VERSION: "1.1.11"
POETRY_VIRTUALENVS_IN_PROJECT: "1"
LATEST_STABLE_BRANCH: "stable/2.5"

jobs:

Expand Down Expand Up @@ -49,5 +57,19 @@ jobs:
- name: Install dependencies
run: poetry install -E docs

- name: Deploy docs to Github Pages
run: poetry run mkdocs gh-deploy --force
- name: Configure git user to make commit
run: |
git config user.name "Arnav Choudhury"
git config user.email "[email protected]"
- name: Fetch gh-pages remote changes (if any)
run: git fetch origin gh-pages --depth=1

- name: Deploy (and Update) docs for the branch, ${GITHUB_REF##*/}
run: poetry run mike deploy --push --rebase "${GITHUB_REF##*/}"

- name: Set default docs to ${LATEST_STABLE_BRANCH##*/}
run: poetry run mike set-default --push --rebase "${LATEST_STABLE_BRANCH##*/}"



0 comments on commit 145d809

Please sign in to comment.