-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (59 loc) · 1.81 KB
/
deploy-documentation.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
68
name: Deploy Documentation
on:
release:
types:
- published
workflow_dispatch:
jobs:
Build-Package-Linux:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup pandoc
run: |
sudo apt-get install -y pandoc
- name: Setup SCIPOptSuite
uses: ./.github/actions/setup-scipoptsuite-action
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: |
requirements.txt
docs/requirements.txt
- name: Prepare Python Environment
run: |
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Setup PySCIPOpt
uses: ./.github/actions/setup-pyscipopt-action
with:
ref: master
- name: Build & Install PyGCGOpt
run: |
pip install .
- name: Build Documentation
run: make html
working-directory: ./docs
- name: Checkout Documentation Branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
- name: Deploy Documentation
run: |
rm -rf gh-pages/*
cp -r docs/_build/html/* gh-pages/
cd gh-pages
git config user.name "GCG CI Bot"
git config user.email "[email protected]"
git add .
git commit --allow-empty -m "Deploy docs to GitHub Pages, GitHub Actions build: ${GITHUB_RUN_ID}" -m "Commit: ${GITHUB_SHA}"
git push
- name: Archive Documentation
uses: actions/upload-artifact@v2
with:
name: sphinx-documentation
path: docs/_build/html