From 0dc8596a89f09a0c1156c49eff2d02e0836e08e2 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Fri, 15 Apr 2022 19:48:23 -0700 Subject: [PATCH] Action to deploy documentation to gh-pages --- .github/workflows/deploy_docs.yml | 36 +++++++++++++++++++++++++++++++ Documentation/.gitignore | 1 + Documentation/Makefile | 20 +++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/deploy_docs.yml create mode 100644 Documentation/Makefile diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml new file mode 100644 index 0000000000..1641fec056 --- /dev/null +++ b/.github/workflows/deploy_docs.yml @@ -0,0 +1,36 @@ + +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