Skip to content

Commit 9728397

Browse files
committed
Action to deploy documentation to gh-pages
1 parent 752a285 commit 9728397

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.github/workflows/deploy_docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
name: Deploy documentation
3+
on:
4+
# Every push onto the main branch regerenates the documentation
5+
push:
6+
branches:
7+
- 'master'
8+
9+
jobs:
10+
11+
do-deploy:
12+
runs-on: ubuntu-latest
13+
name: 'Build documentation on Linux'
14+
steps:
15+
16+
- uses: actions/checkout@v2
17+
18+
- name: Install dependencies
19+
run: |
20+
sudo apt update -qq
21+
sudo apt install -y make autoconf python3-sphinx
22+
23+
- name: Make Documentation
24+
run: |
25+
cd Documentation
26+
make html
27+
28+
- name: Deploy to GitHub Pages
29+
uses: crazy-max/ghaction-github-pages@v2
30+
with:
31+
target_branch: gh-pages
32+
build_dir: Documentation/_build/html
33+
jekyll: false
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Documentation/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
_build/
2+
!Makefile

Documentation/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = IcarusVerilog
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 commit comments

Comments
 (0)