Skip to content

Commit

Permalink
Merge pull request #13 from Baldomo/master
Browse files Browse the repository at this point in the history
Automatic documentation deployment on Github pages
  • Loading branch information
stevelorenz authored Jan 8, 2022
2 parents af350e6 + 709889a commit f559212
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy documentation on GitHub Pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'

- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install doc dependencies
run: python3 -m pip install -r ./doc/requirements.txt

- name: Install mininet and ryu from source
run: python3 -m pip install git+https://github.com/mininet/mininet.git git+https://github.com/faucetsdn/ryu.git@v4.34

- name: Install all other dependencies
run: python3 -m pip install wheel docker pyroute2 requests

- name: Build docs
working-directory: "./doc"
run: sphinx-build -M html . ./build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html

0 comments on commit f559212

Please sign in to comment.