Skip to content

Commit 0dc8596

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

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

.github/workflows/deploy_docs.yml

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