Docs/versioned docs (#240) #4
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: Deploy docs | |
on: | |
push: | |
pull_request: | |
# tags: | |
# - "*" | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Cache Poetry | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-python-3.8 | |
- run: poetry --version | |
- name: Install dependencies | |
run: poetry install | |
- name: fetch from gh-pages | |
run: git fetch origin gh-pages --depth=1 | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Deploy with mike | |
run: | | |
poetry run mike deploy -b gh-pages --update-aliases --push "${{ github.ref_name }}" "latest" | |