diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml new file mode 100644 index 0000000000..5140aa9604 --- /dev/null +++ b/.github/workflows/deploy_docs.yml @@ -0,0 +1,35 @@ + +name: Deploy documentation +on: + # Every push onto the main branch regerenates the documentation + push: + branches: + - 'master' + +jobs: + + do-deploy: + runs-on: ubuntu-latest + name: 'Build documentation on Linux' + steps: + + - uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo apt update -qq + sudo apt install -y make autoconf python3-sphinx + + - name: Make Documentation + run: | + cd Documentation + make html + + - name: Deploy to GitHub Pages + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: Documentation/_build/html + jekyll: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Documentation/.gitignore b/Documentation/.gitignore index 69fa449dd9..f7aa8312c9 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -1 +1,2 @@ _build/ +!Makefile diff --git a/Documentation/Makefile b/Documentation/Makefile new file mode 100644 index 0000000000..3455a703f1 --- /dev/null +++ b/Documentation/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = IcarusVerilog +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file