-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (62 loc) · 1.77 KB
/
doc.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build and Deploy Doc
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip install ".[cplex]"
- run: pip install -r requirements_dev.txt
- run: mkdocs build
deploy_dev:
name: Deploy master docs
runs-on: ubuntu-latest
needs: [build]
env:
POETRY_GIT_COMMITTER_NAME: "${{ secrets.GIT_NAME }}"
POETRY_GIT_COMMITTER_EMAIL: "${{ secrets.GIT_EMAIl }}"
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build and push doc
run: |
pip install ".[cplex]"
pip install -r requirements_dev.txt
git config user.name "${{ secrets.GIT_NAME }}"
git config user.email "${{ secrets.GIT_EMAIl }}"
mike deploy --push master
deploy:
name: Deploy docs
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build Doc
run: |
pip install ".[cplex]"
pip install -r requirements_dev.txt
mkdocs build -v
- name: Publish doc
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site