-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (45 loc) · 1.45 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
# This workflow builds the sphinx docs
name: Sphinx Docs Build
on:
push:
pull_request:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install hyswap, dependencies, and Sphinx then build docs
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install .
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y xdg-utils
sudo apt-get install -y lynx
sudo apt-get install -y graphviz
pydeps hyswap -T png --max-bacon=3 --cluster
mv hyswap.png docs/source/reference/hyswap.png
(cd docs && make docs)
(cd docs && make html)
- name: Debug
run: |
echo $REF
echo $EVENT_NAME
echo ${{ github.event_name == 'push' }}
echo ${{ github.ref == 'refs/heads/main' }}
echo ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.4.2
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
BRANCH: gh-pages
FOLDER: docs/build/html