-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (44 loc) · 1.42 KB
/
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
name: build-docs
on:
workflow_dispatch:
push:
branches: [ main ]
release:
types: [ created ]
# set GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
if: github.repository_owner == 'autoatml' && github.ref == 'refs/heads/main'
defaults:
run:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile
env:
PYTHON_VERSION: "3.10"
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up micromamba
uses: mamba-org/setup-micromamba@main
- name: Create mamba environment
run: |
micromamba create -n autoplex_docs python=$PYTHON_VERSION --yes
- name: Install uv
run: micromamba run -n autoplex_docs pip install uv
- name: Install autoplex and dependencies
run: |
micromamba activate autoplex_docs
uv pip install --upgrade pip
uv pip install --prerelease=allow .[docs,strict]
- name: Build
run: micromamba run -n autoplex_docs sphinx-build -W docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true