Skip to content

Deploy Documentation #16

Deploy Documentation

Deploy Documentation #16

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 "noreply@or.rwth-aachen.de"
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