-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.38 KB
/
dev-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
47
48
49
50
51
name: Dev docs
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "docs"
docs:
name: Build and deploy (dev) docs
runs-on: ubuntu-latest
strategy:
matrix:
python-versions: [3.11]
steps:
- name: Get repo
uses: actions/checkout@v4
- name: Get gh-pages branch
run: git fetch origin gh-pages --depth=1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-versions }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --with dev
- name: Configure git for github-actions[bot]
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Build and push versioned docs with mike
run: |
poetry run mike deploy --push --update-aliases dev
poetry run mike set-default stable --push