-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.29 KB
/
publish-versioned-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Publish [version] docs via GitHub Pages
on:
push:
branches:
- 'v*.*'
jobs:
build:
name: Generate [version] docs
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8 ]
ruby-version: [ 3.0 ]
node-version: [ 16.x ]
steps:
- name: Checkout main
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- 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: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install Python dependencies
run: python3 -m pip install -r ./requirements.txt
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Deploy with mike 🚀
run: |
mike deploy --push ${{ steps.extract_branch.outputs.branch }}